You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by cb...@apache.org on 2020/05/30 13:32:12 UTC

[velocity-site] branch asf-site updated: [site/prod] Fix code example layout bug in configuration page

This is an automated email from the ASF dual-hosted git repository.

cbrisson pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/velocity-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new e70f486  [site/prod] Fix code example layout bug in configuration page
e70f486 is described below

commit e70f4864ca92c625ea5ce9bd99f59c57bdc46f4a
Author: Claude Brisson <cl...@renegat.net>
AuthorDate: Sat May 30 15:32:06 2020 +0200

    [site/prod] Fix code example layout bug in configuration page
---
 engine/2.1/configuration.html   |  5 +++--
 engine/2.2/configuration.html   | 31 +++++++++++++------------------
 engine/devel/configuration.html | 31 +++++++++++++------------------
 3 files changed, 29 insertions(+), 38 deletions(-)

diff --git a/engine/2.1/configuration.html b/engine/2.1/configuration.html
index 5e78766..981ae55 100644
--- a/engine/2.1/configuration.html
+++ b/engine/2.1/configuration.html
@@ -483,8 +483,9 @@ Defines the beginning and ending tags for an in-stream error message in the case
 <p><strong><code>velocimacro.arguments.preserve_literals = false</code></strong></p>
 <blockquote>
 <p>Since 2.0, inside a macro, the rendering of null arguments uses the local reference literal. For instance, the following VTL code</p>
-<div class="codehilite"><pre><span class="cp">#</span><span class="nf">macro</span><span class="p">(</span> <span class="nf">display</span> <span class="p">$</span><span class="nv">foo</span> <span class="p">)</span><span class="x"> </span><span class="p">$</span><span class="nv">foo</span><span class="x"> </span><span class="cp">#</span><span class="nf">end</span><span class="x"></span>
-<span class="cp">#</span><span class="nf">display</span><span class="p">(</span> <span class="p">$</span><span class="nv">null</span> <span class="p">)</span><span class="x"></span>
+<div class="codehilite"><pre><span class="x">    :::velocity</span>
+<span class="x">    </span><span class="cp">#</span><span class="nf">macro</span><span class="p">(</span> <span class="nf">display</span> <span class="p">$</span><span class="nv">foo</span> <span class="p">)</span><span class="x"> </span><span class="p">$</span><span class="nv">foo</span><span class="x"> </span><span class="cp">#</span><span class="nf">end</span><span class="x"></span>
+<span class="x">    </span><span class="cp">#</span><span class="nf">display</span><span class="p">(</span> <span class="p">$</span><span class="nv">null</span> <span class="p">)</span><span class="x"></span>
 </pre></div>
 
 
diff --git a/engine/2.2/configuration.html b/engine/2.2/configuration.html
index 41b4648..06849cf 100644
--- a/engine/2.2/configuration.html
+++ b/engine/2.2/configuration.html
@@ -240,11 +240,6 @@ h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover
 </li>
 <li><a href="#resource-management">Resource Management</a></li>
 <li><a href="#velocimacros">Velocimacros</a></li>
-<li><a href="#macro-display-foo-foo-end">macro( display $foo ) $foo #end</a></li>
-<li><a href="#display-bar-where-bar-is-null">display( $bar ) ## where $bar is null</a></li>
-<li><a href="#macro-display-foo-foo-end_1">macro( display $foo ) $foo #end</a></li>
-<li><a href="#set-foo-hello">set( $foo = 'hello' )</a></li>
-<li><a href="#display">display()</a><ul>
 <li><a href="#strict-reference-setting">Strict Reference Setting</a></li>
 <li><a href="#string-interpolation">String Interpolation</a></li>
 <li><a href="#math">Math</a></li>
@@ -260,8 +255,6 @@ h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover
 </ul>
 </li>
 </ul>
-</li>
-</ul>
 </div>
 <h2 id="configuring-velocity">Configuring Velocity<a class="headerlink" href="#configuring-velocity" title="Permanent link">&para;</a></h2>
 <p>Velocity's runtime configuration is controlled by a set of configuration keys listed below. Generally, these keys will have values that consist of either a String, or a comma-separated list of Strings, referred to as a CSV for comma-separated values.</p>
@@ -513,22 +506,24 @@ Defines the beginning and ending tags for an in-stream error message in the case
 <ol>
 <li>
 <p>Since 2.0, inside a macro, the rendering of null arguments uses the local reference literal. For instance, the following VTL code</p>
-<p>:::velocity</p>
-<h1 id="macro-display-foo-foo-end">macro( display $foo ) $foo #end<a class="headerlink" href="#macro-display-foo-foo-end" title="Permanent link">&para;</a></h1>
-<h1 id="display-bar-where-bar-is-null">display( $bar ) ## where $bar is null<a class="headerlink" href="#display-bar-where-bar-is-null" title="Permanent link">&para;</a></h1>
-</li>
-</ol>
+<div class="codehilite"><pre><span class="cp">#</span><span class="nf">macro</span><span class="p">(</span> <span class="nf">display</span> <span class="p">$</span><span class="nv">foo</span> <span class="p">)</span><span class="x"> </span><span class="p">$</span><span class="nv">foo</span><span class="x"> </span><span class="cp">#</span><span class="nf">end</span><span class="x"></span>
+<span class="cp">#</span><span class="nf">display</span><span class="p">(</span> <span class="p">$</span><span class="nv">bar</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> where $bar is null</span><span class="x"></span>
+</pre></div>
+
+
 <p>will display <code>$foo</code>. When B.C. mode is enabled, Velocity will mimic the 1.x behavior which is to render <code>$bar</code>.</p>
-<ol>
+</li>
 <li>
 <p>Since 2.0, missing arguments which don't have an explicit default value are considered null inside the macro. The following code</p>
-<p>:::velocity</p>
-<h1 id="macro-display-foo-foo-end_1">macro( display $foo ) $foo #end<a class="headerlink" href="#macro-display-foo-foo-end_1" title="Permanent link">&para;</a></h1>
-<h1 id="set-foo-hello">set( $foo = 'hello' )<a class="headerlink" href="#set-foo-hello" title="Permanent link">&para;</a></h1>
-<h1 id="display">display()<a class="headerlink" href="#display" title="Permanent link">&para;</a></h1>
+<div class="codehilite"><pre><span class="cp">#</span><span class="nf">macro</span><span class="p">(</span> <span class="nf">display</span> <span class="p">$</span><span class="nv">foo</span> <span class="p">)</span><span class="x"> </span><span class="p">$</span><span class="nv">foo</span><span class="x"> </span><span class="cp">#</span><span class="nf">end</span><span class="x"></span>
+<span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">foo</span> <span class="o">=</span> <span class="s1">&#39;hello&#39;</span> <span class="p">)</span><span class="x"></span>
+<span class="cp">#</span><span class="nf">display</span><span class="p">()</span><span class="x"></span>
+</pre></div>
+
+
+<p>will display <code>$foo</code>. When B.C. mode is enabled, Velocity will mimic the 1.x behavior which is to use the global context value, that is render <code>hello</code>.</p>
 </li>
 </ol>
-<p>will display <code>$foo</code>. When B.C. mode is enabled, Velocity will mimic the 1.x behavior which is to use the global context value, that is render <code>hello</code>.</p>
 </blockquote>
 <p><strong><code>velocimacro.body_reference = false</code></strong></p>
 <blockquote>
diff --git a/engine/devel/configuration.html b/engine/devel/configuration.html
index 3aea44b..8f4bcab 100644
--- a/engine/devel/configuration.html
+++ b/engine/devel/configuration.html
@@ -240,11 +240,6 @@ h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover
 </li>
 <li><a href="#resource-management">Resource Management</a></li>
 <li><a href="#velocimacros">Velocimacros</a></li>
-<li><a href="#macro-display-foo-foo-end">macro( display $foo ) $foo #end</a></li>
-<li><a href="#display-bar-where-bar-is-null">display( $bar ) ## where $bar is null</a></li>
-<li><a href="#macro-display-foo-foo-end_1">macro( display $foo ) $foo #end</a></li>
-<li><a href="#set-foo-hello">set( $foo = 'hello' )</a></li>
-<li><a href="#display">display()</a><ul>
 <li><a href="#strict-reference-setting">Strict Reference Setting</a></li>
 <li><a href="#string-interpolation">String Interpolation</a></li>
 <li><a href="#math">Math</a></li>
@@ -260,8 +255,6 @@ h2:hover > .headerlink, h3:hover > .headerlink, h1:hover > .headerlink, h6:hover
 </ul>
 </li>
 </ul>
-</li>
-</ul>
 </div>
 <h2 id="configuring-velocity">Configuring Velocity<a class="headerlink" href="#configuring-velocity" title="Permanent link">&para;</a></h2>
 <p>Velocity's runtime configuration is controlled by a set of configuration keys listed below. Generally, these keys will have values that consist of either a String, or a comma-separated list of Strings, referred to as a CSV for comma-separated values.</p>
@@ -513,22 +506,24 @@ Defines the beginning and ending tags for an in-stream error message in the case
 <ol>
 <li>
 <p>Since 2.0, inside a macro, the rendering of null arguments uses the local reference literal. For instance, the following VTL code</p>
-<p>:::velocity</p>
-<h1 id="macro-display-foo-foo-end">macro( display $foo ) $foo #end<a class="headerlink" href="#macro-display-foo-foo-end" title="Permanent link">&para;</a></h1>
-<h1 id="display-bar-where-bar-is-null">display( $bar ) ## where $bar is null<a class="headerlink" href="#display-bar-where-bar-is-null" title="Permanent link">&para;</a></h1>
-</li>
-</ol>
+<div class="codehilite"><pre><span class="cp">#</span><span class="nf">macro</span><span class="p">(</span> <span class="nf">display</span> <span class="p">$</span><span class="nv">foo</span> <span class="p">)</span><span class="x"> </span><span class="p">$</span><span class="nv">foo</span><span class="x"> </span><span class="cp">#</span><span class="nf">end</span><span class="x"></span>
+<span class="cp">#</span><span class="nf">display</span><span class="p">(</span> <span class="p">$</span><span class="nv">bar</span> <span class="p">)</span><span class="x"> </span><span class="cp">##</span><span class="c"> where $bar is null</span><span class="x"></span>
+</pre></div>
+
+
 <p>will display <code>$foo</code>. When B.C. mode is enabled, Velocity will mimic the 1.x behavior which is to render <code>$bar</code>.</p>
-<ol>
+</li>
 <li>
 <p>Since 2.0, missing arguments which don't have an explicit default value are considered null inside the macro. The following code</p>
-<p>:::velocity</p>
-<h1 id="macro-display-foo-foo-end_1">macro( display $foo ) $foo #end<a class="headerlink" href="#macro-display-foo-foo-end_1" title="Permanent link">&para;</a></h1>
-<h1 id="set-foo-hello">set( $foo = 'hello' )<a class="headerlink" href="#set-foo-hello" title="Permanent link">&para;</a></h1>
-<h1 id="display">display()<a class="headerlink" href="#display" title="Permanent link">&para;</a></h1>
+<div class="codehilite"><pre><span class="cp">#</span><span class="nf">macro</span><span class="p">(</span> <span class="nf">display</span> <span class="p">$</span><span class="nv">foo</span> <span class="p">)</span><span class="x"> </span><span class="p">$</span><span class="nv">foo</span><span class="x"> </span><span class="cp">#</span><span class="nf">end</span><span class="x"></span>
+<span class="cp">#</span><span class="nf">set</span><span class="p">(</span> <span class="p">$</span><span class="nv">foo</span> <span class="o">=</span> <span class="s1">&#39;hello&#39;</span> <span class="p">)</span><span class="x"></span>
+<span class="cp">#</span><span class="nf">display</span><span class="p">()</span><span class="x"></span>
+</pre></div>
+
+
+<p>will display <code>$foo</code>. When B.C. mode is enabled, Velocity will mimic the 1.x behavior which is to use the global context value, that is render <code>hello</code>.</p>
 </li>
 </ol>
-<p>will display <code>$foo</code>. When B.C. mode is enabled, Velocity will mimic the 1.x behavior which is to use the global context value, that is render <code>hello</code>.</p>
 </blockquote>
 <p><strong><code>velocimacro.body_reference = false</code></strong></p>
 <blockquote>