Add parsermode pragma

Fixes #7058
This commit is contained in:
jeremy@jermolene.com
2022-11-23 22:35:32 +00:00
parent 882e040e62
commit 00927d2e13
5 changed files with 125 additions and 2 deletions

View File

@@ -10,7 +10,7 @@ In order to display Tiddlers (usually the text field), the WikiText parser reads
* ''block mode'' - the parser will recognise only [[block mode WikiText|Block Mode WikiText]] punctuation
* ''inline mode'' - the parser will recognise only [[inline mode WikiText|Inline Mode WikiText]]
The parser [[transitions between these modes|WikiText parser mode transitions]] based on the text it encounters. In addition, there are [[places where the parser ignores WikiText|Places where the parser ignores WikiText]] punctuation.
The parser [[transitions between these modes|WikiText parser mode transitions]] based on the text it encounters. In addition, there are [[places where the parser ignores WikiText|Places where the parser ignores WikiText]] punctuation. The parser mode can also be set directly with the [[Pragma: \parsermode]].
<<.tip "The concept of inline vs block also exists for standard HTML elements. For HTML, these [[two layout modes|https://www.w3schools.com/html/html_blocks.asp]] determine if the output flows together on the same line or not.
<p>Most [[block mode WikiText|Block Mode WikiText]] corresponds to [[block level HTML elements|https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements]] and most [[inline mode WikiText|Inline Mode WikiText]] corresponds to [[inline level HTML elements|https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements]]. However, for Wikitext the two modes are just as important for determining which syntax will be recognised by the parser as they are for determining how the output will flow.</p>">>