Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render MOTD with a single message #2059

Merged
merged 2 commits into from
Feb 19, 2018
Merged

Render MOTD with a single message #2059

merged 2 commits into from
Feb 19, 2018

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Feb 13, 2018

Instead of splitting it on server and creating Msg for every line, just let keep the newlines in parse and let CSS render it correctly.

@xPaw xPaw force-pushed the xpaw/motd branch 2 times, most recently from c583686 to e961ddb Compare February 13, 2018 14:29
Copy link
Member

@astorije astorije left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, that is so much nicer!!
Small comment about adding a test then all good.

@@ -93,8 +93,7 @@ function buildChatMessage(msg) {
msg.highlight = true;
}

if (constants.actionTypes.indexOf(type) !== -1) {
msg.template = "actions/" + type;
if (typeof templates.actions[type] !== "undefined") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool. This was long-overdue! 👏

@@ -19,7 +19,8 @@ const colorRx = /^(\d{1,2})(?:,(\d{1,2}))?/;
const hexColorRx = /^([0-9a-f]{6})(?:,([0-9a-f]{6}))?/i;

// Represents all other control codes that to be ignored/filtered from the text
const controlCodesRx = /[\u0000-\u001F]/g;
// This regex allows line feed character
const controlCodesRx = /[\u0000-\u0009\u000B-\u001F]/g;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think you could add a test for this regex change? 🙏 🙏

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@astorije astorije added the Type: Feature Tickets that describe a desired feature or PRs that add them to the project. label Feb 14, 2018
Copy link
Member

@astorije astorije left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

@xPaw xPaw modified the milestones: 2.7.1, 3.0.0 Feb 18, 2018
@xPaw xPaw merged commit b82ceb1 into master Feb 19, 2018
@xPaw xPaw deleted the xpaw/motd branch February 19, 2018 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants