forked from jgm/lunamark
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #473 from Witiko/feat/first-class-yaml
Add option `ensureJekyllData`
- Loading branch information
Showing
4 changed files
with
186 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
tests/testfiles/unit/lunamark-markdown/ensure-jekyll-data.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
\markdownSetup{jekyllData=true, expectJekyllData=true, ensureJekyllData=true} | ||
<<< | ||
title: The document title | ||
author: | ||
|
||
- name: Author *One* | ||
affiliation: University of Somewhere | ||
- name: Author **Two** | ||
affiliation: University of Nowhere | ||
date: 2022-01-12 | ||
... | ||
|
||
This test ensures that the Lua `jekyllData`, `expectJekyllData`, and | ||
`ensureJekyllData` correctly propagate through the plain TeX interface. | ||
|
||
A document may contain *multiple* metadata blocks: | ||
|
||
--- | ||
title: 'This is the title: it contains a colon' | ||
author: | ||
- Author One with `inline` markup in *their name* | ||
- Author Two | ||
keywords: | ||
- nothing | ||
- 123 | ||
- true | ||
- false | ||
- ~ | ||
- null | ||
abstract: | | ||
This is *the abstract*. | ||
|
||
It consists of two paragraphs. | ||
--- | ||
>>> | ||
BEGIN document | ||
error: parse_blocks failed on: title: The document | ||
END document |