WikiBanhMi:Giúp sử dụng/Part 1: Wikimark

Wikimark is the markup specification that is used by Wikibanhmi. This wiki page describes wikimark.
The wikimark parser is under construction.

Mục lục

1. General
2. Quick Text Decoration
3. Heading
4. Mustache
5. Ignore
6. Styling
6.1. Div styling
6.2. Fast styling
6.2.1. Text Color
6.2.2. Text Size
6.2.3. Fast-styling mustache inside fast-styling mustache
7. Folding
8. Code highlighting @
9. Macro
10. Link
11. Table
12. Double Char syntax cancelling
13. Reference
14. Other
14.1. Horizontal line
14.2. Quote
14.3. Listing

1. General (Sửa) (-)

Unlike wikipedia or other wiki markup languages, putting HTML code directly does not work at all in wikimark.

2. Quick Text Decoration (Sửa) (-)

Used to quickly change text style or decorate text. There should be no newline in the content. Or else, the syntax will be ignored.
bold italics

Text size and color can be changed using Mustache:
{{#white #}}
{{#+1 #}}
Mustache-syntax is explained more below.

3. Heading (Sửa) (-)

Use == === ==== and more to creating heading text. They are automatically numbered by wikimark parser. And based on them the table of contents is created.

4. Mustache (Sửa) (-)

Using double Angular brackets {{ is a common way of templating, and it is called mustache, with a lowercase m.
Wikimark’s Mustache, with a uppercase M, is the various usage of {{ with special characters and keywords, ex: {{! {{# {{$ {{@

You need to put a closing mustache for every opening Mustache, or the Mustache will not be closed until the end of the page and you will have unpredicted circumstances.

You also need to put a space or newline after an opening Mustache and before a closing Mustache, or the Mustache will be ignored completely.
The space/newline after an opening Mustache and after a closing Mustache is not shown in the final result.

The 4 sections from here on describe different variations of Mustache.

5. Ignore (Sửa) (-)

Use mustache and ! to make the content inside ignore any wikimark grammar.
{{! This part is ignored! !}}

{{@ {{! @}} is closed in the next {{@ !}} @}}. Therefore, if you write {{@ {{! {{! wiki !}} wiki !}} @}} the result will be {{! {{! wiki !}} wiki !}}

There are actually two ways to make text ignore wikimark. The other way is by using {{@, which is code highlighting. However in this case, the text is highlighted.

6. Styling (Sửa) (-)

6.1. Div styling (Sửa) (-)

Use {{#style="..." in order to make a div and style it.

{{#style="text-align:center" some text #}}

6.2. Fast styling (Sửa) (-)

By putting a special style value right after #, you can fast-style the content. This doesn’t create a div, but only creates a span. There fore it is inline.

6.2.1. Text Color (Sửa) (-)

Use # and hexcode/color to change color of text.
{{#navy This is fast styled navy color #}}
{{#333 This is fast styled grey color #}}

6.2.2. Text Size (Sửa) (-)

{{#+1 bigger text #}}
{{#-1 smaller text #}}

6.2.3. Fast-styling mustache inside fast-styling mustache (Sửa) (-)

Of course, you can put one fast styling inside another fast styling mustache:
{{#yellow {{#+1 hello world #}} #}}

7. Folding (Sửa) (-)

The text in the first line will be displayed. The text in the lines after will be folded.

{{$ [start folding]

8. Code highlighting @ (Sửa) (-)

Use code highlighting

Don't specify a language for plaintext
This will not do any code highlighting, but it will ignore wikimark, and be put in a grey box.

print("hello world")
def hello():

If you are going to make code highlighting inline, you can:
{{@ print("hello world") @}}
{{@python print(hello world) @}}

9. Macro (Sửa) (-)

Use single brackets mixed with keywords to replace it with complete items.

10. Link (Sửa) (-)

variations inside double square brackets
...To be documented

11. Table (Sửa) (-)

...To be documented

12. Double Char syntax cancelling (Sửa) (-)

...To be documented

13. Reference (Sửa) (-)

...To be documented

14. Other (Sửa) (-)

Some simple syntaxes that are very useful.

14.1. Horizontal line (Sửa) (-)

5 dashes
...To be documented

14.2. Quote (Sửa) (-)

...To be documented

14.3. Listing (Sửa) (-)

...To be documented
WikiBanhMi 2020 | License |