Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Amethyst|Tools: DokuWiki output filter
- Loading branch information
Showing
2 changed files
with
117 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
$ Amethyst Dokuwiki Source formatting. | ||
|
||
$*** FORMATTING RULES ***$ | ||
@format{@=@s(**|<nowiki>**</nowiki>)} | ||
@format{break}{@N} | ||
@format{br}{@n} | ||
|
||
$ Styles. | ||
@format{order 1 parent try em file pass parent !em}{//@=} | ||
@format{order -1 parent em parent !em}{@=//} | ||
@format{order -1 parent file parent !em}{@=@_//} | ||
@format{order 1 parent strong}{**@=} | ||
@format{order -1 parent strong}{@=**} | ||
$@format{parent count 1 opt parent !samp}{''@=''} | ||
@format{order 1 parent cmd}{''@=} | ||
@format{order -1 parent cmd}{@=''} | ||
@format{order 1 parent var}{''@=} | ||
@format{order -1 parent var}{@=''} | ||
@format{order 1 parent opt}{''@=} | ||
@format{order -1 parent opt}{@=''} | ||
@format{order 1 parent code}{''@=} | ||
@format{order -1 parent code}{@=''} | ||
@format{order 1 parent email}{//@=} | ||
@format{order -1 parent email}{@=//} | ||
@format{pre !control}{@n@= @< @B<pre> @> </pre>@b} | ||
@format{order 1 parent caption}{//@=} | ||
@format{order -1 parent caption}{@=//} | ||
@format{br parent caption}{\\} | ||
|
||
$ Indented styles. | ||
@format{indent !cite}{@= @< >@_ @> @N} | ||
$style="padding-left:1.5em;@_margin:0.5em;" | ||
|
||
$ Remove all section numbers, Mediawiki numbers them on its own. | ||
@format{parent child 1 parent try chapter section subsec sub2sec pass}{} | ||
|
||
$ Titles. | ||
@format{child 2 parent chapter}{@<=====@_@>@_=====} | ||
@format{child 2 parent section}{@<====@_@>@_====} | ||
@format{child 2 parent subsec}{@<===@_@>@_===} | ||
@format{child 2 parent sub2sec}{@<==@_@>@_==} | ||
@format{child 2 parent sub3sec}{@N@<**@_@>@_**@N} | ||
|
||
$ Lists. | ||
$@format{parent list}{*@_ @> @n} | ||
$@format{parent enum list}{#@_} | ||
$@format{list}{@< <ul> @> </ul>} | ||
$@format{enum list}{@< <ol> @> </ol>} | ||
@format{parent list !note}{@n@_@_* @> @n} | ||
@format{list !note parent3 deflist}{@>@N} | ||
@format{parent enum list !note}{@n@_@_- @> @n} | ||
@format{child 1 parent2 deflist}{@< @n@_@_;} | ||
@format{child 2 parent2 deflist}{@< @n@_@_:} | ||
$@format{note list}{@< <blockquote>'''Note:''' @> </blockquote>} | ||
|
||
$ Tables. | ||
$@format{table}{@< @{|@_align="center"@_class="wikitable"@n @> |@}} | ||
@format{parent table}{@> @_|@n } | ||
@format{first !header @ parent2 table}{count 0 parent2 table} | ||
{@< |@_ } | ||
@format{first header @ parent2 table}{@< ^@_ } | ||
|
||
$*** LENGTH RULES ***$ | ||
|
||
$ Word spacing. | ||
@length{!text ? !text . !text , !text : !text ; !begins ) !begins ] !begins @} !email !url}{ | ||
try email url pass order 1}{opt !order 1}{spacing 1} | ||
@length{try text ) text ] pass}{prev try text ( text [ text @{ pass}{ | ||
order 1 parent prev try text ( text [ pass}{ | ||
order 1 parent2 try part chapter section subsec sub2sec sub3sec pass}{ | ||
order 1 single}{spacing 0} | ||
|
||
$ Lists. | ||
@length{leftmargin 0} | ||
@length{try table list deflist pre pass}{spacing 0} |
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