meteor-messageformat icon indicating copy to clipboard operation
meteor-messageformat copied to clipboard

[v2] Line breaks within mf string

Open isAlmogK opened this issue 9 years ago • 2 comments

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.

isAlmogK avatar May 28 '15 16:05 isAlmogK

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.

tomitrescak avatar Jul 08 '15 10:07 tomitrescak

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

gadicc avatar Jul 08 '15 15:07 gadicc