]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Uses highlight syntax for example blocks.
authorRich Bowen <rbowen@apache.org>
Tue, 14 Apr 2026 17:15:12 +0000 (17:15 +0000)
committerRich Bowen <rbowen@apache.org>
Tue, 14 Apr 2026 17:15:12 +0000 (17:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1933050 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_include.html.en.utf8
docs/manual/mod/mod_include.xml

index 35f25a7b6764fe8fe15a63572da001d522aa270e..f440cb395deaad64eb36b680548bf0117f3523f1 100644 (file)
@@ -470,15 +470,13 @@ AddOutputFilter INCLUDES .shtml</pre>
       include the onerror path fails, or if onerror is not specified, the
       default error message will be included.</p>
 
-      <div class="example"><p><code>
-        # Simple example<br />
-        &lt;!--#include virtual="/not-exist.html" onerror="/error.html" --&gt;
-      </code></p></div>
+      <div class="example"><pre class="prettyprint lang-html"># Simple example
+&lt;!--#include virtual="/not-exist.html" onerror="/error.html" --&gt;</pre>
+</div>
 
-      <div class="example"><p><code>
-        # Dedicated onerror paths<br />
-        &lt;!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --&gt;
-      </code></p></div>
+      <div class="example"><pre class="prettyprint lang-html"># Dedicated onerror paths
+&lt;!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --&gt;</pre>
+</div>
 
       </dd>
       </dl>
@@ -640,12 +638,11 @@ AddOutputFilter INCLUDES .shtml</pre>
 
     <p>The basic flow control elements are:</p>
 
-    <div class="example"><p><code>
-      &lt;!--#if expr="<var>test_condition</var>" --&gt;<br />
-      &lt;!--#elif expr="<var>test_condition</var>" --&gt;<br />
-      &lt;!--#else --&gt;<br />
-      &lt;!--#endif --&gt;
-    </code></p></div>
+    <div class="example"><pre class="prettyprint lang-html">&lt;!--#if expr="test_condition" --&gt;
+&lt;!--#elif expr="test_condition" --&gt;
+&lt;!--#else --&gt;
+&lt;!--#endif --&gt;</pre>
+</div>
 
     <p>The <code>if</code> element works like an if statement in a
     programming language. The test condition is evaluated and if
@@ -672,28 +669,20 @@ AddOutputFilter INCLUDES .shtml</pre>
     <p>The below example will print "from local net" if client IP address
     belongs to the 10.0.0.0/8 subnet.</p>
 
-    <div class="example"><p><code>
-      &lt;!--#if expr='-R "10.0.0.0/8"' --&gt;<br />
-      <span class="indent">
-        from local net<br />
-      </span>
-      &lt;!--#else --&gt;<br />
-      <span class="indent">
-        from somewhere else<br />
-      </span>
-      &lt;!--#endif --&gt;
-    </code></p></div>
+    <div class="example"><pre class="prettyprint lang-html">&lt;!--#if expr='-R "10.0.0.0/8"' --&gt;
+  from local net
+&lt;!--#else --&gt;
+  from somewhere else
+&lt;!--#endif --&gt;</pre>
+</div>
 
     <p>The below example will print "foo is bar" if the variable
     <code>foo</code> is set to the value "bar".</p>
 
-    <div class="example"><p><code>
-      &lt;!--#if expr='v("foo") = "bar"' --&gt;<br />
-      <span class="indent">
-        foo is bar<br />
-      </span>
-      &lt;!--#endif --&gt;
-    </code></p></div>
+    <div class="example"><pre class="prettyprint lang-html">&lt;!--#if expr='v("foo") = "bar"' --&gt;
+  foo is bar
+&lt;!--#endif --&gt;</pre>
+</div>
 
     <div class="note"><h3>Reference Documentation</h3>
     <p>See also: <a href="../expr.html">Expressions in Apache HTTP Server</a>,
@@ -720,14 +709,11 @@ AddOutputFilter INCLUDES .shtml</pre>
       URL, such as a link to that URL. Note that the URL is only tested
       for whether access would be granted, not whether the URL exists.</p>
 
-      <div class="example"><h3>Example</h3><p><code>
-        &lt;!--#if expr="-A /private" --&gt;<br />
-        <span class="indent">
-          Click &lt;a href="/private"&gt;here&lt;/a&gt; to access private
-          information.<br />
-        </span>
-        &lt;!--#endif --&gt;
-      </code></p></div>
+      <div class="example"><h3>Example</h3><pre class="prettyprint lang-html">&lt;!--#if expr="-A /private" --&gt;
+  Click &lt;a href="/private"&gt;here&lt;/a&gt; to access private
+  information.
+&lt;!--#endif --&gt;</pre>
+</div>
       </dd>
 
       <dt><code><var>string1</var> = <var>string2</var><br />
@@ -748,13 +734,10 @@ AddOutputFilter INCLUDES .shtml</pre>
       <code>$9</code>. The whole string matched by the regular expression is
       stored in the special variable <code>$0</code></p>
 
-      <div class="example"><h3>Example</h3><p><code>
-        &lt;!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" --&gt;<br />
-        <span class="indent">
-          &lt;!--#set var="session" value="$1" --&gt;<br />
-        </span>
-        &lt;!--#endif --&gt;
-      </code></p></div>
+      <div class="example"><h3>Example</h3><pre class="prettyprint lang-html">&lt;!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" --&gt;
+  &lt;!--#set var="session" value="$1" --&gt;
+&lt;!--#endif --&gt;</pre>
+</div>
       </dd>
 
       <dt><code><var>string1</var> &lt; <var>string2</var><br />
@@ -788,10 +771,9 @@ AddOutputFilter INCLUDES .shtml</pre>
     "<code>&amp;&amp;</code>" and "<code>||</code>". "<code>!</code>" binds
     most tightly. Thus, the following are equivalent:</p>
 
-    <div class="example"><p><code>
-      &lt;!--#if expr="$a = test1 &amp;&amp; $b = test2" --&gt;<br />
-      &lt;!--#if expr="($a = test1) &amp;&amp; ($b = test2)" --&gt;
-    </code></p></div>
+    <div class="example"><pre class="prettyprint lang-html">&lt;!--#if expr="$a = test1 &amp;&amp; $b = test2" --&gt;
+&lt;!--#if expr="($a = test1) &amp;&amp; ($b = test2)" --&gt;</pre>
+</div>
 
     <p>The boolean operators <code>&amp;&amp;</code> and <code>||</code>
     share the same priority. So if you want to bind such an operator more
index 9ce2283b028c2d472936bac94c48efeebd99947a..bedb52281a5246da3e3a2a51bae4c691a2781b82 100644 (file)
@@ -450,13 +450,17 @@ Options +Includes
       default error message will be included.</p>
 
       <example>
-        # Simple example<br />
-        &lt;!--#include virtual="/not-exist.html" onerror="/error.html" --&gt;
+<highlight language="html">
+# Simple example
+&lt;!--#include virtual="/not-exist.html" onerror="/error.html" --&gt;
+</highlight>
       </example>
 
       <example>
-        # Dedicated onerror paths<br />
-        &lt;!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --&gt;
+<highlight language="html">
+# Dedicated onerror paths
+&lt;!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --&gt;
+</highlight>
       </example>
 
       </dd>
@@ -625,10 +629,12 @@ Options +Includes
     <p>The basic flow control elements are:</p>
 
     <example>
-      &lt;!--#if expr="<var>test_condition</var>" --&gt;<br />
-      &lt;!--#elif expr="<var>test_condition</var>" --&gt;<br />
-      &lt;!--#else --&gt;<br />
-      &lt;!--#endif --&gt;
+<highlight language="html">
+&lt;!--#if expr="test_condition" --&gt;
+&lt;!--#elif expr="test_condition" --&gt;
+&lt;!--#else --&gt;
+&lt;!--#endif --&gt;
+</highlight>
     </example>
 
     <p>The <code>if</code> element works like an if statement in a
@@ -658,26 +664,24 @@ Options +Includes
     belongs to the 10.0.0.0/8 subnet.</p>
 
     <example>
-      &lt;!--#if expr='-R "10.0.0.0/8"' --&gt;<br />
-      <indent>
-        from local net<br />
-      </indent>
-      &lt;!--#else --&gt;<br />
-      <indent>
-        from somewhere else<br />
-      </indent>
-      &lt;!--#endif --&gt;
+<highlight language="html">
+&lt;!--#if expr='-R "10.0.0.0/8"' --&gt;
+  from local net
+&lt;!--#else --&gt;
+  from somewhere else
+&lt;!--#endif --&gt;
+</highlight>
     </example>
 
     <p>The below example will print "foo is bar" if the variable
     <code>foo</code> is set to the value "bar".</p>
 
     <example>
-      &lt;!--#if expr='v("foo") = "bar"' --&gt;<br />
-      <indent>
-        foo is bar<br />
-      </indent>
-      &lt;!--#endif --&gt;
+<highlight language="html">
+&lt;!--#if expr='v("foo") = "bar"' --&gt;
+  foo is bar
+&lt;!--#endif --&gt;
+</highlight>
     </example>
 
     <note><title>Reference Documentation</title>
@@ -706,12 +710,12 @@ Options +Includes
       for whether access would be granted, not whether the URL exists.</p>
 
       <example><title>Example</title>
-        &lt;!--#if expr="-A /private" --&gt;<br />
-        <indent>
-          Click &lt;a href="/private"&gt;here&lt;/a&gt; to access private
-          information.<br />
-        </indent>
-        &lt;!--#endif --&gt;
+<highlight language="html">
+&lt;!--#if expr="-A /private" --&gt;
+  Click &lt;a href="/private"&gt;here&lt;/a&gt; to access private
+  information.
+&lt;!--#endif --&gt;
+</highlight>
       </example>
       </dd>
 
@@ -734,11 +738,11 @@ Options +Includes
       stored in the special variable <code>$0</code></p>
 
       <example><title>Example</title>
-        &lt;!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" --&gt;<br />
-        <indent>
-          &lt;!--#set var="session" value="$1" --&gt;<br />
-        </indent>
-        &lt;!--#endif --&gt;
+<highlight language="html">
+&lt;!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" --&gt;
+  &lt;!--#set var="session" value="$1" --&gt;
+&lt;!--#endif --&gt;
+</highlight>
       </example>
       </dd>
 
@@ -774,8 +778,10 @@ Options +Includes
     most tightly. Thus, the following are equivalent:</p>
 
     <example>
-      &lt;!--#if expr="$a = test1 &amp;&amp; $b = test2" --&gt;<br />
-      &lt;!--#if expr="($a = test1) &amp;&amp; ($b = test2)" --&gt;
+<highlight language="html">
+&lt;!--#if expr="$a = test1 &amp;&amp; $b = test2" --&gt;
+&lt;!--#if expr="($a = test1) &amp;&amp; ($b = test2)" --&gt;
+</highlight>
     </example>
 
     <p>The boolean operators <code>&amp;&amp;</code> and <code>||</code>