A Wenyan Markdown language concept.
- Clone:
git clone https://github.com/Meowcolm024/jian.git - Build:
stack build - Run:
stack run [filename]
| 箋 Jian | Markdown |
|---|---|
| Example.jian | Example.md |
| 滕王閣序.jian | 滕王閣序.md |
Currently supported syntax:
Headings are done through indentations. Only the following punctuations are supported: ·, ——, 《》.
Every 2 indentations adds one title level.
史記
本紀
秦始皇本紀第六
<!--Euqals to-->
# 史記
## 本紀
### 秦始皇本紀第六A paragraph should only take up ONE line and each sentence should end with either 。?!:;.
Inline elements like
Image,URLandInlinewould not be parsed when they are in a sentecne. So you can only add they after a punctuation mentioned above or at the start of a line.Details
Try to compare the following:
For
有Haskell码曰:〔putStrLn "Hello"〕乃「安好」也。, it will be parsed to:有Haskell码曰:`putStrLn "Hello"`乃「安好」也。While
有Haskell码曰〔putStrLn "Hello"〕乃「安好」也。will be parsed to有Haskell码曰〔putStrLn "Hello"〕乃「安好」也。Do notice there is a
:in the first sentence separating them.
Blockquotes are wrapped in 「「 and 」」. They should be in a separate line.
Example:
「「
長太息以掩涕兮,哀民生之多艱。
」」
<!--Euqals to-->
<blockquote>
長太息以掩涕兮,哀民生之多艱。
</blockquote>Ordered lists start with a number (in Hanzi), followed by a 、, like 一、, and it ends with 【列終】.
Examples:
一、文言也
二、Haskell也
三、表之實例也
【列終】
<!--Euqals to-->
1. 文言也
2. Haskell也
3. 表之實例也For unordered lists, use 〇, and it ends with 【列終】.
〇《滕王閣序》
〇《醉翁亭記》
【列終】
<!--Euqals to-->
- 《滕王閣序》
- 《醉翁亭記》Comments start with 批: or 疏::
Comments only works in a separate line i.e. a separate paragraph
批:註釋也
<!--Euqals to-->
<!--註釋也-->Format should be strictly followed: 【有圖者「[name]」自「[url]」來】
Notice: An extra empty line is needed in order to generate a newline.
Example:
【有圖者「清明上河圖」自「zhangzeduan」來】
<!--Euqals to-->
Format should be strictly followed: 【有扉者「[name]」通「[url]」也】
Notice: An extra empty line is needed in order to generate a newline.
【有扉者「Github」通「https://github.com」也】
<!--Euqals to-->
[Github](https://github.com)Format should be strictly followed: 〔[code]〕
Notice: An extra empty line is needed in order to generate a newline.
Example:
〔putStrLn "Hello"〕
<!--Euqals to-->
`putStrLn "Hello"`Code blocks are wrapped in 〔〔書以:[language] and 〕〕
「書以」is not that appropriate, might be changed later.
Example:
〔〔書以:haskell
isShuzi :: Char -> Bool
isShuzi x = x `elem` "零一二三四五六七八九十百千萬"
〕〕| Feature | Status | Note |
|---|---|---|
| Heading | ✓ | Done through indentations |
| Ordered List | ✓ | Starts with [數字]、 ends with 【列終】 |
| Unordered List | ✓ | Starts with 〇, ends with 【列終】 |
| Blockquote | ✓ | Wrapped in 「「 and 」」 |
| Image | ✓ | 【有圖者「[name]」自「[url]」來】 |
| URL | ✓ | 【有扉者「[name]」通「[url]」也】 |
| Comment | ✓ | Starts with 批: |
| Inline | ✓ | Wrapped in 〔 and 〕 |
| Code Block | 〇 | Wrapped in 〔〔書以:[language] and 〕〕 |
| Table | ? | - |
| Bold | ? | - |
| Italic | 𐄂 | There is no italic in Chinese |