From ca98e039e9e955b38f40278f309753c7d8eaead2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Star=C3=BD=20Novotn=C3=BD?= Date: Mon, 12 Feb 2024 19:55:09 +0100 Subject: [PATCH] Rename option `contentType` to `contentLevel` --- markdown.dtx | 22 +++++++++---------- ...pe-block.test => content-level-block.test} | 2 +- ...-inline.test => content-level-inline.test} | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) rename tests/testfiles/lunamark-markdown/{content-type-block.test => content-level-block.test} (97%) rename tests/testfiles/lunamark-markdown/{content-type-inline.test => content-level-inline.test} (96%) diff --git a/markdown.dtx b/markdown.dtx index 67f3bba5..78ea81d6 100644 --- a/markdown.dtx +++ b/markdown.dtx @@ -5209,17 +5209,17 @@ defaultOptions.contentBlocks = false % %<*manual-options> -#### Option `contentType` +#### Option `contentLevel` -`contentType` (default value: `block`) +`contentLevel` (default value: `block`) % \fi % \begin{markdown} % -% \Optitem[block]{contentType}{\opt{block}, \opt{inline}} +% \Optitem[block]{contentLevel}{\opt{block}, \opt{inline}} % : block - + : Treat content as a sequence of blocks. ``` md - this is a list @@ -5227,7 +5227,7 @@ defaultOptions.contentBlocks = false `````` : inline - + : Treat all content as inline content. ``` md - this is a text @@ -5243,7 +5243,7 @@ Using a text editor, create a text document named `document.tex` with the following content: ``` tex \input markdown -\def\markdownOptionContentType{inline} +\def\markdownOptionContentLevel{inline} \markdownBegin - this is - a text @@ -5273,7 +5273,7 @@ following content: - a list \end{markdown} -\begin{markdown}[contentType=inline] +\begin{markdown}[contentLevel=inline] - this is - a text \end{markdown} @@ -5305,7 +5305,7 @@ following content: - a list \stopmarkdown -\setupmarkdown[contentType = inline] +\setupmarkdown[contentLevel = inline] \startmarkdown - this is - a text @@ -5330,7 +5330,7 @@ following text: % \fi % \begin{macrocode} \@@_add_lua_option:nnn - { contentType } + { contentLevel } { string } { block } % \end{macrocode} @@ -5339,7 +5339,7 @@ following text: %<*lua,lua-cli> % \fi % \begin{macrocode} -defaultOptions.contentType = "block" +defaultOptions.contentLevel = "block" % \end{macrocode} % \par % \iffalse @@ -29436,7 +29436,7 @@ end syntax.AutoLinkRelativeReference = parsers.fail end - if options.contentType == "inline" then + if options.contentLevel == "inline" then syntax[1] = "Inlines" syntax.Inlines = V("InitializeState") * parsers.Inline^0 diff --git a/tests/testfiles/lunamark-markdown/content-type-block.test b/tests/testfiles/lunamark-markdown/content-level-block.test similarity index 97% rename from tests/testfiles/lunamark-markdown/content-type-block.test rename to tests/testfiles/lunamark-markdown/content-level-block.test index 3415176d..c3116fc9 100644 --- a/tests/testfiles/lunamark-markdown/content-type-block.test +++ b/tests/testfiles/lunamark-markdown/content-level-block.test @@ -1,4 +1,4 @@ -\markdownSetup{contentType=block} +\markdownSetup{contentLevel=block} <<< This test ensures that the Lua `contentType` option correctly propagates through the plain TeX interface. Setting the `contentType` option to the diff --git a/tests/testfiles/lunamark-markdown/content-type-inline.test b/tests/testfiles/lunamark-markdown/content-level-inline.test similarity index 96% rename from tests/testfiles/lunamark-markdown/content-type-inline.test rename to tests/testfiles/lunamark-markdown/content-level-inline.test index ea47bf5e..89fce5d1 100644 --- a/tests/testfiles/lunamark-markdown/content-type-inline.test +++ b/tests/testfiles/lunamark-markdown/content-level-inline.test @@ -1,4 +1,4 @@ -\markdownSetup{contentType=inline} +\markdownSetup{contentLevel=inline} <<< This test ensures that the Lua `contentType` option correctly propagates through the plain TeX interface. Setting the `contentType` option to the