Paired Shortcodes using special blocks (No Arguments)
tags: shortcode paired special-block no-arguments
Description/Summary
Tests for paired shortcodes with no arguments.Content
Test case for feature requested in ox-hugo
Issue #119.
Paired markdown shortcode #
#+begin_mdshortcode
Content *with* /emphasis/ characters is rendered.
#+end_mdshortcode
Above will export as:
{{% mdshortcode %}}
Content *with* /emphasis/ characters is rendered.
{{% /mdshortcode %}}
and render as:
Content with emphasis characters is rendered.
Paired non-markdown (default) shortcode #
Markdown is !! NOT !! rendered in non-markdown shortcodes.
#+begin_myshortcode
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.
#+end_myshortcode
Above will export as:
{{< myshortcode >}}
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.
{{< /myshortcode >}}
and render as:
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.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.
Page (Debug)
Page Variable | Value | |
---|---|---|
Name | "Paired Shortcodes using special blocks (No Arguments)" | |
Title | "Paired Shortcodes using special blocks (No Arguments)" | |
ResourceType | "page" | |
Kind | "page" | |
Section | "posts" | |
Draft | false | |
Type | "posts" | |
Layout | "" | |
Permalink | "https://ox-hugo.scripter.co/test/posts/paired-shortcodes-special-blocks-no-arguments/" | |
RelPermalink | "/posts/paired-shortcodes-special-blocks-no-arguments/" | |
Data |
| |
NextPage | Paired shortcodes using special blocks (Named Arguments) | |
PrevPage | Paired shortcodes using special blocks (Positional Arguments) | |
NextInSection | Paired shortcodes using special blocks (Named Arguments) | |
PrevInSection | Paired shortcodes using special blocks (Positional Arguments) |
Page Params (Debug)
Key | Type | Value |
---|---|---|
description | string | "Tests for paired shortcodes with no arguments." |
draft | bool | false |
iscjklanguage | bool | false |
lastmod | time.Time | 2022-01-09 21:40:09 -0500 -0500 |
tags | []string | "shortcode" "paired" "special-block" "no-arguments" |
title | string | "Paired Shortcodes using special blocks (No Arguments)" |
File Object (Debug)
FileInfo Variable | Value |
---|---|
UniqueID | "ade7fd28f68a00c87beadf7c0df18c4c" |
BaseFileName | "paired-shortcodes-special-blocks-no-arguments" |
TranslationBaseName | "paired-shortcodes-special-blocks-no-arguments" |
Lang | "en" |
Section | "posts" |
LogicalName | "paired-shortcodes-special-blocks-no-arguments.md" |
Dir | "posts/" |
Ext | "md" |
Path | "posts/paired-shortcodes-special-blocks-no-arguments.md" |