go>> jian>> 返回
项目作者: Meowcolm024

项目描述 :
A Wenyan markdown language concept
高级语言: Haskell
项目地址: git://github.com/Meowcolm024/jian.git
创建时间: 2020-02-01T14:46:15Z
项目社区:https://github.com/Meowcolm024/jian

开源协议:BSD 3-Clause "New" or "Revised" License

下载


箋 Jian

A Wenyan Markdown language concept.

Install

  1. Clone: git clone https://github.com/Meowcolm024/jian.git
  2. Build: stack build
  3. Run: stack run [filename]

Examples

箋 Jian Markdown
Example.jian Example.md
滕王閣序.jian 滕王閣序.md

Syntax

Currently supported syntax:

Headings

Headings are done through indentations. Only the following punctuations are supported: ·, ——, 《》.

Every 2 indentations adds one title level.

  1. 史記
  2. 本紀
  3. 秦始皇本紀第六
  4. <!--Euqals to-->
  5. # 史記
  6. ## 本紀
  7. ### 秦始皇本紀第六

Body

A paragraph should only take up ONE line and each sentence should end with either 。?!:;.



Inline elements like Image, URL and Inline would 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.



Try to compare the following:

For 有Haskell码曰:〔putStrLn "Hello"〕乃「安好」也。, it will be parsed to:

markdown 有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.

Blockquote

Blockquotes are wrapped in 「「 and 」」. They should be in a separate line.

Example:

  1. 「「
  2. 長太息以掩涕兮,哀民生之多艱。
  3. 」」
  4. <!--Euqals to-->
  5. <blockquote>
  6. 長太息以掩涕兮,哀民生之多艱。
  7. </blockquote>

List

Ordered lists start with a number (in Hanzi), followed by a , like 一、, and it ends with 【列終】.

Examples:

  1. 一、文言也
  2. 二、Haskell
  3. 三、表之實例也
  4. 【列終】
  5. <!--Euqals to-->
  6. 1. 文言也
  7. 2. Haskell
  8. 3. 表之實例也

For unordered lists, use , and it ends with 【列終】.

  1. 〇《滕王閣序》
  2. 〇《醉翁亭記》
  3. 【列終】
  4. <!--Euqals to-->
  5. - 《滕王閣序》
  6. - 《醉翁亭記》

Comments

Comments start with 批: or 疏::

Comments only works in a separate line i.e. a separate paragraph

  1. 批:註釋也
  2. <!--Euqals to-->
  3. <!--註釋也-->

Images

Format should be strictly followed: 【有圖者「[name]」自「[url]」來】

Notice: An extra empty line is needed in order to generate a newline.

Example:

  1. 【有圖者「清明上河圖」自「zhangzeduan」來】
  2. <!--Euqals to-->
  3. ![清明上河圖](zhangzeduan)

URL

Format should be strictly followed: 【有扉者「[name]」通「[url]」也】

Notice: An extra empty line is needed in order to generate a newline.

  1. 【有扉者「Github」通「https://github.com」也】
  2. <!--Euqals to-->
  3. [Github](https://github.com)

Inline

Format should be strictly followed: 〔[code]〕

Notice: An extra empty line is needed in order to generate a newline.

Example:

  1. putStrLn "Hello"
  2. <!--Euqals to-->
  3. `putStrLn "Hello"`

Code Block

Code blocks are wrapped in 〔〔書以:[language] and 〕〕

「書以」is not that appropriate, might be changed later.

Example:

  1. 〔〔書以:haskell
  2. isShuzi :: Char -> Bool
  3. isShuzi x = x `elem` "零一二三四五六七八九十百千萬"
  4. 〕〕

Ideas

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