Merge pull request #1405 from ubertao/multi-line-compliments

Multi-line compliments
This commit is contained in:
Michael Teeuw
2018-09-25 11:36:27 +02:00
committed by GitHub
4 changed files with 13 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
*This release is scheduled to be released on 2018-10-01.*
### Added
- Support multi-line compliments
- Simplified Chinese translation for "Feels"
- Polish translate for "Feels"
- French translate for "Feels"

View File

@@ -128,6 +128,10 @@ sup {
text-overflow: ellipsis;
}
.pre-line {
white-space: pre-line;
}
/**
* Region Definitions.
*/

View File

@@ -107,6 +107,13 @@ config: {
}
````
#### Multi-line compliments:
Use `\n` to split compliment text into multiple lines, e.g. `First line.\nSecond line.` will be shown as:
```
First line.
Second line.
```
### External Compliment File
You may specify an external file that contains the three compliment arrays. This is particularly useful if you have a
large number of compliments and do not wish to crowd your `config.js` file with a large array of compliments.

View File

@@ -159,7 +159,7 @@ Module.register("compliments", {
var compliment = document.createTextNode(complimentText);
var wrapper = document.createElement("div");
wrapper.className = this.config.classes ? this.config.classes : "thin xlarge bright";
wrapper.className = this.config.classes ? this.config.classes : "thin xlarge bright pre-line";
wrapper.appendChild(compliment);
return wrapper;