Skip to content

imgproc does not work with % for markdown body #332

@jthomerson

Description

@jthomerson

I want the body (inner content) of my imgproc call to contain markdown, so I use {{% instead of {{<. However, this results in a broken page.

Example of my markdown:

{{% imgproc my-image-name Resize "800x" %}}
   Note: Some information about this image and maybe some *bold* and _italic_ words.
{{% /imgproc %}}

Rendered page (note the <pre><code>:

<div class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: 810px">
   <img class="card-img-top" src="/docs/foo/bar/my-image-name_foo_913314_800x0_resize_catmullrom_2.png" width="800" height="797">
<pre><code>&lt;div class=&quot;card-body px-0 pt-2 pb-0&quot;&gt;
    &lt;p class=&quot;card-text&quot;&gt;
</code></pre>
<p>Note: Some information about this image and maybe some <strong>bold</strong> and <em>italic</em> words.</p>
</p>
   </div>
</div>

I found that this can be fixed by replacing the tabs in layouts/shortcodes/imgproc.html with spaces. Apparently the tabs are making the markdown renderer think that you're trying to get the HTML in the shortcode markup to be a code block.

Is there some other way to fix this? If not, would you consider changing your indentation style?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions