Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

Template Filter - linebreaks


Example

Convert line breaks into <br>, and double line breaks into <p>:

{{ mytext|linebreaks }}
Run Example »

Definition and Usage

The linebreaks filter replaces line breaks with <br> and double line breaks with <p>.

See also the linebreaksbr filter.


Syntax

{{ value|linebreaks }}

Template filters are defined by using a pipe | character followed by the name of the filter.