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

Create paragraphs from text input #10

Open
d6y opened this issue Mar 7, 2012 · 0 comments
Open

Create paragraphs from text input #10

d6y opened this issue Mar 7, 2012 · 0 comments
Labels

Comments

@d6y
Copy link
Owner

d6y commented Mar 7, 2012

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

Solution: if pre doesn't do what you want use:

text.split("\n").toList flatMap { Text(_) ++ <br/> } init 

Discussion:

Possibly discuss Lift's escaping safety mechnism.

Possibly discuss \n vi \r\n
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant