Source block with list syntax in a list
categories: upstream
tags: src-block lists hyphen blackfriday
Description/Summary
An upstream bug in Blackfriday Issue #239 caused fenced code blocks in lists to not render correctly if they contain Markdown syntax lists. ox-hugo provides a hack to get around that bug. Below is an example of such a case: List item 1 - List item 1.1 in code block - List item 1.2 in code block List item 2 + List item 2.1 in code block + List item 2.
Content
An upstream bug in Blackfriday Issue #239 caused fenced code blocks in
lists to not render correctly if they contain Markdown syntax
lists. ox-hugo
provides a hack to get around that bug.
Below is an example of such a case:
- List item 1
- List item 1.1 in code block - List item 1.2 in code block
- List item 2
+ List item 2.1 in code block + List item 2.2 in code block
- List item 3
Another such example, but with space before a hyphen in source block:
- First item
ports: foo: bar
- Second item
ports: - port: 80
- Third item
Page (Debug)
Page Variable | Value | |
---|---|---|
Name | "Source block with list syntax in a list" | |
Title | "Source block with list syntax in a list" | |
ResourceType | "page" | |
Kind | "page" | |
Section | "posts" | |
Draft | false | |
Type | "posts" | |
Layout | "" | |
Permalink | "https://ox-hugo.scripter.co/test/posts/list-has-src-block-with-list-syntax/" | |
RelPermalink | "/posts/list-has-src-block-with-list-syntax/" | |
Data |
| |
NextPage | Source block with list syntax but not in a list | |
PrevPage | Source block without list syntax in a list | |
NextInSection | Source block with list syntax but not in a list | |
PrevInSection | Source block without list syntax in a list |
Page Params (Debug)
Key | Type | Value |
---|---|---|
categories | []string | "upstream" |
date | time.Time | 2017-08-01 00:00:00 +0000 UTC |
draft | bool | false |
iscjklanguage | bool | false |
lastmod | time.Time | 2022-05-27 10:36:55 -0400 -0400 |
publishdate | time.Time | 2017-08-01 00:00:00 +0000 UTC |
tags | []string | "src-block" "lists" "hyphen" "blackfriday" |
title | string | "Source block with list syntax in a list" |
File Object (Debug)
FileInfo Variable | Value |
---|---|
UniqueID | "687c79003969dc3d9a2af946a9dfb38b" |
BaseFileName | "list-has-src-block-with-list-syntax" |
TranslationBaseName | "list-has-src-block-with-list-syntax" |
Lang | "en" |
Section | "posts" |
LogicalName | "list-has-src-block-with-list-syntax.md" |
Dir | "posts/" |
Ext | "md" |
Path | "posts/list-has-src-block-with-list-syntax.md" |