Ticket #4658: 4658.diff

File 4658.diff, 661 bytes (added by Gary Wilson <gary.wilson@…>, 17 years ago)

maybe something like this

  • docs/templates.txt

     
    10581058linebreaks
    10591059~~~~~~~~~~
    10601060
    1061 Converts newlines into ``<p>`` and ``<br />`` tags.
     1061Converts newlines into ``<br />`` tags and consecutive newlines into ``<p>`` tags.
    10621062
     1063For example, with the following string stored in the context variable ``text``::
     1064
     1065  This is
     1066  paragraph one.
     1067
     1068  This is
     1069  paragraph two.
     1070
     1071``{{ text|linebreaks }}`` would become::
     1072
     1073  <p>This is<br />paragraph one.</p>
     1074 
     1075  <p>This is<br />paragraph two.</p>
     1076
    10631077linebreaksbr
    10641078~~~~~~~~~~~~
    10651079
Back to Top