diff --git a/CHANGELOG.md b/CHANGELOG.md index a976bec7..4afc38b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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" diff --git a/css/main.css b/css/main.css index db1fb428..84f8c4d2 100644 --- a/css/main.css +++ b/css/main.css @@ -128,6 +128,10 @@ sup { text-overflow: ellipsis; } +.pre-line { + white-space: pre-line; +} + /** * Region Definitions. */ diff --git a/modules/default/compliments/README.md b/modules/default/compliments/README.md index 8f796888..7220cd29 100644 --- a/modules/default/compliments/README.md +++ b/modules/default/compliments/README.md @@ -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. diff --git a/modules/default/compliments/compliments.js b/modules/default/compliments/compliments.js index 74aef034..bfa85879 100644 --- a/modules/default/compliments/compliments.js +++ b/modules/default/compliments/compliments.js @@ -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;