newlines in output for Text
Output for Text should convert \n to br tags. In the case of WikiText it would probably interfere with Markdown.
Workaround:
output(/\n/.replaceAll("<br />", thetext) as WikiText)
Example:
Submitted by Danny Groenewegen on 28 March 2010 at 10:34application exampleapp entity Bla { text :: Text } var b1 := Bla{} define page root() { output(/\n/.replaceAll("<br />", b1.text) as WikiText) form{ input(b1.text) submit action{} {"save"} } }
Issue Log
This should definitly not be applied automatically to WikiText. I’m not sure I see the case for Text either.
It was only suggested for output of Text here, where it seems like a reasonable default for output to an html page. If the template is rendering for a different mimetype, it shouldn’t do this conversion.
Alternatively, we could use the php solution of a built-in nl2br function to make this common operation easier.
I think the latter solution is better. I don’t see a general case for selectively interpreting characters as markup.
the nl2br can be put in the library; no need for built-in
closing this issue and tagging it ‘documentation’
Log in to post comments