You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.4 KiB

+++ title = "Paired Shortcodes using special blocks (No Arguments)" tags = ["shortcode", "paired", "special-block", "no-arguments"] draft = false +++

Test case for feature requested in ox-hugo Issue #119.

Paired markdown shortcode

{{% mdshortcode %}} Content with emphasis characters is rendered.

The HTML markup will also get rendered. {{% /mdshortcode %}}

This will export as:

{{%/* mdshortcode */%}} Content rendered as Markdown {{%/* /mdshortcode */%}}

Paired non-markdown (default) shortcode

{{< myshortcode >}} Content is rendered like HTML. The Markdown emphasis characters are !! NOT !! rendered.

So a blank line before this sentence in the Markdown source will not result in a new paragraph in HTML.

But this will be a new paragraph as it is wrapped in HTML <p> tags.

{{< /myshortcode >}}

This will export as:

{{</* myshortcode */>}} Content NOT rendered as Markdown {{</* /myshortcode */>}}

Not a recognized paired shortcode

Content with Markdown emphasis characters is rendered fine in the default Special Blocks.

This will export as Special Blocks --- either wrapped with <div> tags or HTML5-recognized tags.