Package: ikiwiki
Version: 2.40
Severity: normal

Hello.

While migrating my site to use prefix directives, after rebuilt I
noticed a smelly diff in one blog entry involving several \[[ escapes.

In particular:

  * when rendering a page, if the \[[ is between `backticks` and not
    ]]-closed in the same line, the backslash is emitted in the html
    output.

    This works with prefix_directives disabled.

  * for \[[ escapes that are closed in the same line, and *only* when
    inlining, the opening and closing double brackets are not emitted.

    The case where the escape contains spaces works without prefix
    directives, and doesn't with them. If the escape is a single word,
    it doesn't work in either case (nor with 2.32).

The following file illustrates the problem:

-8<-
So, \[[this escape]] gets its brackets stripped when inlined.
Now, the next one is always emitted with the backslash: `\[[this
one]]`, but only because it's between backticks. In a block:

      \[[this one brackets stripped]]
      \[[this one
          backslash preserved]]

Finally, this \[[escape]] too gets its brackets stripped when inlining,
but that's not 2.40 specific.
->8-

--- out-2.40-noprefix
+++ out-2.40-prefix
@@ -30,10 +30,11 @@

 <div id="content">
 <p>So, [[this escape]] gets its brackets stripped when inlined.
-Now, the next one is always emitted with the backslash: <code>[[this 
one]]</code>, but only because it&#8217;s between backticks. In a block:</p>
+Now, the next one is always emitted with the backslash: <code>\[[this
+one]]</code>, but only because it&#8217;s between backticks. In a block:</p>

 <pre><code>  [[this one brackets stripped]]
-  [[this one
+  \[[this one
       backslash preserved]]
 </code></pre>

--- out-2.40-noprefix/inline.html
+++ out-2.40-prefix/inline.html
@@ -37,11 +37,12 @@
 <a href="entries/entry.html">entry</a>

 </span>
-<p>So, [[this escape]] gets its brackets stripped when inlined.
-Now, the next one is always emitted with the backslash: <code>[[this 
one]]</code>, but only because it&#8217;s between backticks. In a block:</p>
+<p>So, this escape gets its brackets stripped when inlined.
+Now, the next one is always emitted with the backslash: <code>\[[this
+one]]</code>, but only because it&#8217;s between backticks. In a block:</p>

-<pre><code>  [[this one brackets stripped]]
-  [[this one
+<pre><code>  this one brackets stripped
+  \[[this one
       backslash preserved]]
 </code></pre>


-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
«A lo que iba. El amor es como el embutido: hay lomo embuchado y hay
mortadela.»
                -- Carlos Ruiz Zafón, “La sombra del viento”



Reply via email to