d6y/lift-cookbook — Issue #10: Create paragraphs from text input
Author: d6y
Created: 2012-03-07 20:05:38+00:00
State: open
Labels: to write

You have text with new line characters and you want to replace them with br tags for display.

Solution: if

doesn't do what you want, flatMap { Text(_) ++
} init

Discussion:

Possibly discuss Lift's escaping safety mechnism.

Textile also supports this, but produces valid html (i.e., body tags etc). I think. Check that

See:

http://groups.google.com/group/liftweb/browse_thread/thread/e678976b8f403a76/fa7eb01e137261f9?lnk=gst&q=paragraph+breaks#fa7eb01e137261f9

http://groups.google.com/group/liftweb/browse_thread/thread/c75e15409e681d78/b34d327c947cf364?lnk=gst&q=new+line+to#b34d327c947cf364