[{"created":"20220101155101130","text":"\\define none(content) @@background-color:orange;<<__content__>>@@\n\\define partial(content) @@background-color:cyan;<<__content__>>@@\n\\define inline(content) @@background-color:lightgreen;<<__content__>>@@\n\\define full(content) @@background-color:pink;<<__content__>>@@\n\n\\define repeat(n str) <$text text={{{[range<__n__>] :map[<__str__>] :and[join[]]}}}/>\n\\define lcurly(n) <<repeat $n$ \"{\">>\n\\define rcurly(n) <<repeat $n$ \"}\">>\n\\define lbrace(n) <<repeat $n$ \"[\">>\n\\define rbrace(n) <<repeat $n$ \"]\">>\n\\define row(what, examples)\n<tr><td><<__what__>></td><td>\n\n$examples$</td></tr>\n\\end\n\nWikiText is processed differently depending on where it is located. There are four ways WikiText can be processed:\n\n* <<none \"no wikification\">>\n* <<partial \"non-recursive wikification using special attribute syntax\">>\n* recursive wikification\n** <<inline \"inline mode\">>\n** <<full \"block mode\">>\n\nHere is a sample of the various WikiText contructs, showing examples of the above four wikification modes:\n<table>\n<tbody>\n<<row \"[[Linking in WikiText]]\" '<<lbrace 2>><<none \"literal link text\">>|<<none \"literal link target\">><<rbrace 2>>'>>\n<<row \"[[Images in WikiText]]\" '<<lbrace 1>>img<<lbrace 1>><<none \"literal image link text\">><<rbrace 2>>'>>\n<<row \"[[Code Blocks in WikiText]]\" \"\"\"\nOne main purpose of codeblocks is to to suppress wikitext expansion:<br/>\n<<repeat 1 \"`\">><<none \"literal text\">><<repeat 1 \"`\">>\n\n<pre><<repeat 3 \"`\">>\n<<none \"literal text\">>\n<<repeat 3 \"`\">>\n</pre>\n\"\"\">>\n<<row \"[[Macro Calls in WikiText]]\" \"\"\"&lt;&lt;mymacro  \"<<none \"literal text\">>\" <<none '&lt;&lt;no_macro_expansion&gt;&gt;'>> <<none '<<lcurly 2>>no_transclusion<<rcurly 2>>'>>&gt;&gt;\"\"\">>\n<<row \"[[Headings in WikiText]]\" '<<repeat 1 \"!\">> <<inline \"only inline wikitext is expanded  here\">>'>>\n<<row \"[[Lists in WikiText]]\" '<<repeat 1 \"*\">> <<inline \"only inline wikitext is expanded here\">>'>>\n<<row \"[[Formatting in WikiText]]\" \"\"\"\n\nOnly inline wikitext is expanded for text enclosed by these formatting constructs:\n\n* <<repeat 2 \"'\">><<inline \"bold\">><<repeat 2 \"'\">>\n* <<repeat 2 \"/\">><<inline \"italic\">><<repeat 2 \"/\">>\n* <<repeat 2 \"_\">><<inline \"underscore\">><<repeat 2 \"_\">>\n* <<repeat 2 \"^\">><<inline \"superscript\">><<repeat 2 \"^\">>\n* <<repeat 2 \",\">><<inline \"subscript\">><<repeat 2 \",\">>\n* <<repeat 2 \"~\">><<inline \"strikethrough\">><<repeat 2 \"~\">>\n\"\"\">>\n<<row \"[[HTML in WikiText]]\" \"\"\"\nNo attribute values enclosed by quotes are wikified:\n<pre>&lt;''div''\n  data-attr1=\"<<none 'this is literal text'>>\"\n  data-attr2=\"<<none '&lt;&lt;no_macro_expansion&gt;&gt;'>>\"\n  data-attr3=\"<<none '<<lcurly 2>>no_transclusion<<rcurly 2>>'>>\"\n  data-attr4=<<partial \"&lt;&lt;single_level_macro_expansion&gt;&gt;\">>\n  data-attr5=<<partial \"<<lcurly 2>>single_level_transclusion<<rcurly 2>>\">>\n/&gt;</pre>\nBy default only inline mode constructs in the body are wikified:\n<pre>&lt;''div''&gt;\n<<inline \"&lt;&lt;recursive_wikification&gt;&gt;\">> (inline only)\n<<inline \"<<lcurly 2>>recursive_wikification<<rcurly 2>>\">> (inline only)\n<<repeat 2 \"'\">><<inline \"bold is an inline construct\">><<repeat 2 \"'\">>\n&lt;''/div''&gt;\n</pre>\nHowever if a blank line is included after the opening tag then block mode constructs will also be wikified:\n<pre>&lt;''div''&gt;\n\n<<full \"&lt;&lt;recursive_wikification&gt;&gt;\">>\n<<full \"<<lcurly 2>>recursive_wikification<<rcurly 2>>\">>\n* lists are\n* block mode constructs\n&lt;''/div''&gt;</pre>\n\"\"\">>\n<<row \"[[Widgets in WikiText]]\" \"A [[widget's|Widgets]] attributes behave the same as explained above for [[HTML in WikiText]]. Not all [[widgets|Widgets]] will render its body content as WikiText. The documentation for each one will explain if and how the body content will be rendered. If rendered as WikiText, then the block and inline mode behavior will be the same as for [[HTML in WikiText]]\">>\n<<row \"[[Filter Parameter]]\" \"\"\"\n<pre>[then<<partial \"<single_level_macro_expansion>\">>] [then<<partial \"{single_level_transclusion}\">>]\n</pre>\n\"\"\">>\n</tbody>\n</table>","title":"illustration showing which TW syntax gets wikified","ftlist_day":"2022-01-01","modified":"20220102200221320"}]