Whitespace trimming around special blocks (corner cases)
tags: special-block whitespace trimming corner-cases
Description/Summary
Corner cases for testing the whitespace trimming around the special blocks.Content
Whitespace trimming inside quote blocks #
line 1 marked text line 2
line 4 (line 3, above, is blank, but inside the quote block)
-
Special block in a quote block in a list
line 1 marked text line 2
line 4 (line 3, above, is blank, but inside the quote block)
Whitespace trimming before list elements #
something marked text
- list item 1
- list item 2
Whitespace trimming before headings #
something marked text
Next heading #
Whitespace trimming before and after code blocks #
something marked text
code line
marked text something
inline code 1
marked text
inline code 2
something
Whitespace trimming with :trim-pre
set immediately after a heading
#
marked text
>
character before a special block with :trim_pre
set
#
This marked text’s foreground is red.
Hugo shortcode in a definition list with pre/post trimming #
The content in the inline
shortcode (created for this test site)
should render inline and not create a parapraph break at the end of
it.
- defn1
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque et quam metus. Etiam in iaculis mi, sit amet pretium magna. Donec ut dui mi. Maecenas pharetra sapien nunc, ut mollis enim aliquam quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque et quam metus. Etiam in iaculis mi, sit amet pretium magna. Donec ut dui mi. Maecenas pharetra sapien nunc, ut mollis enim aliquam quis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque et quam metus. Etiam in iaculis mi, sit amet pretium magna. Donec ut dui mi. Maecenas pharetra sapien nunc, ut mollis enim aliquam quis.
- defn2
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque et quam metus. Etiam in iaculis mi, sit amet pretium magna. Donec ut dui mi. Maecenas pharetra sapien nunc, ut mollis enim aliquam quis.
Last element of a post #
No “post” trim markers should be inserted after this block as it’s the last element of this post.
Page (Debug)
Page Variable | Value | |
---|---|---|
Name | "Whitespace trimming around special blocks (corner cases)" | |
Title | "Whitespace trimming around special blocks (corner cases)" | |
ResourceType | "page" | |
Kind | "page" | |
Section | "posts" | |
Draft | false | |
Type | "posts" | |
Layout | "" | |
Permalink | "https://ox-hugo.scripter.co/test/posts/ws-trimming-around-special-blocks-corner-cases/" | |
RelPermalink | "/posts/ws-trimming-around-special-blocks-corner-cases/" | |
Data |
| |
NextPage | Whitespace trimming around special blocks | |
PrevPage | Wrapping Org headings in HTML tags | |
NextInSection | Whitespace trimming around special blocks | |
PrevInSection | Wrapping Org headings in HTML tags |
Page Params (Debug)
Key | Type | Value |
---|---|---|
description | string | " Corner cases for testing the whitespace trimming around the special\n blocks.\n " |
draft | bool | false |
iscjklanguage | bool | false |
lastmod | time.Time | 2022-01-27 15:26:10 -0500 -0500 |
tags | []string | "special-block" "whitespace" "trimming" "corner-cases" |
title | string | "Whitespace trimming around special blocks (corner cases)" |
File Object (Debug)
FileInfo Variable | Value |
---|---|
UniqueID | "f26af54b97f9b5427dcef0abf82bffcc" |
BaseFileName | "ws-trimming-around-special-blocks-corner-cases" |
TranslationBaseName | "ws-trimming-around-special-blocks-corner-cases" |
Lang | "en" |
Section | "posts" |
LogicalName | "ws-trimming-around-special-blocks-corner-cases.md" |
Dir | "posts/" |
Ext | "md" |
Path | "posts/ws-trimming-around-special-blocks-corner-cases.md" |