-
Notifications
You must be signed in to change notification settings - Fork 2
/
nl2br.html
147 lines (127 loc) · 6.15 KB
/
nl2br.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>nl2br — Manual de Twig en Español</title>
<link rel="stylesheet" href="../_static/tnp.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: 'v1.12.0-RC1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/translations.js"></script>
<link rel="shortcut icon" href="../_static/icotnp.ico"/>
<link rel="top" title="Manual de Twig en Español" href="../index.html" />
<link rel="up" title="Filtros" href="index.html" />
<link rel="next" title="upper" href="upper.html" />
<link rel="prev" title="capitalize" href="capitalize.html" />
</head>
<body>
<div class="imalogo">
<a href="../index.html"><img src="http://gitnacho.github.com/tnp/img/twig/twig-logo.png" alt="Traducciones de Nacho Pacheco" />
<a href="../index.html"><img src="http://gitnacho.github.com/tnp/_static/normaltnp.png" alt="Traducciones de Nacho Pacheco" /></a>
<div class="social">
<a href="https://twitter.com/share" class="twitter-share-button" data-via="esymfony" data-lang="es">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
<div id="searchbox">
<form class="searc " action="../search.html" method="get">
<input type="search" name="q" placeholder="Término a buscar" />
<input type="submit" value="Ir" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
<div class="related">
<h3>Navegación</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="Índice General"
accesskey="I">índice</a></li>
<li class="right" >
<a href="upper.html" title="upper"
accesskey="N">siguiente</a> |</li>
<li class="right" >
<a href="capitalize.html" title="capitalize"
accesskey="P">anterior</a> |</li>
<li><a href="../index.html">Twig en Español</a> »</li>
<li><a href="index.html" accesskey="U">Filtros</a> »</li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="nl2br">
<h1><tt class="docutils literal"><span class="pre">nl2br</span></tt><a class="headerlink" href="#nl2br" title="Enlazar permanentemente con este título">¶</a></h1>
<p class="versionadded">
<span class="versionmodified">Nuevo en la versión 1.5: </span>El filtro <tt class="docutils literal"><span class="pre">nl2br</span></tt> se añadió en <em>Twig</em> 1.5.</p>
<p>El filtro <tt class="docutils literal"><span class="pre">nl2br</span></tt> inserta saltos de línea <em>HTML</em> antes de todas las nuevas líneas en una cadena:</p>
<div class="highlight-jinja"><div class="highlight"><pre><span class="cp">{{</span> <span class="s2">"I like Twig.\nYou will like it too."</span><span class="o">|</span><span class="nf">nl2br</span> <span class="cp">}}</span><span class="x"></span>
<span class="c">{# produce</span>
<span class="c"> I like Twig.<br /></span>
<span class="c"> You will like it too.</span>
<span class="c">#}</span><span class="x"></span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Nota</p>
<p class="last">El filtro <tt class="docutils literal"><span class="pre">nl2br</span></tt> primero escapa la entrada antes de aplicar la transformación.</p>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<a href="https://github.com/fabpot/Twig"><img style="position: fixed; top: 0; right: 0; border: 0;" src="http://gitnacho.github.com/tnp/img/comun/bifurcame.png" alt="Bifúrcame en GitHub" /></a>
<div style="width:740px;margin:10px auto;">
<div class="related">
<h3>Navegación</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="Índice General"
>índice</a></li>
<li class="right" >
<a href="upper.html" title="upper"
>siguiente</a> |</li>
<li class="right" >
<a href="capitalize.html" title="capitalize"
>anterior</a> |</li>
<li><a href="../index.html">Twig en Español</a> »</li>
<li><a href="index.html" >Filtros</a> »</li>
</ul>
</div>
</div>
<div style="width: 740px; margin: 0 auto;">
<div id="disqus_thread"></div>
<div class="footer">
© Copyright 2011-2013, Traducido por Nacho Pacheco.
Actualizado por última vez en Jan 18, 2013.
Creado con <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</div>
<script type="text/javascript">
var disqus_shortname = 'documentos-mx';
var disqus_developer = 1;
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>
Por favor activa JavaScript para ver los <a href="http://disqus.com/?ref_noscript">comentarios accionados por Disqus.</a>
</noscript>
</body>
</html>