meteor-messageformat
meteor-messageformat copied to clipboard
[v2] Line breaks within mf string
Before version 2 I was able to have line breaks within the MF string I did something like the following
// Text for verify email
Accounts.emailTemplates.verifyEmail.text = function(user, url) {
return mf('WelcomeToText', "At GoPlatfarm we're all about helping farmers! To verify your email address, simply click the link below:\n\n") + url;
};
It makes sense for this not to work as MF should only return a string, but it might a nice feature to be able to format / line break.
Correct, I wanted to store multiline strings in mf and then format them using markdown, While in the message format UI the string is still multiline, the mf function removes all the line breaks, rendering its use with markdown useless.
Confirming. This is due to our underlying library change from messageformat.js to yahoo's intl-messageformat (a bit of info about it in the README In the v2 branch). I've opened an issue upstream for this: https://github.com/yahoo/intl-messageformat-parser/issues/10