Code Monkey home page Code Monkey logo

jian's Introduction

箋 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.

史記
  本紀
    秦始皇本紀第六
<!--Euqals to-->
# 史記
## 本紀
### 秦始皇本紀第六

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:

有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:

「「
長太息以掩涕兮,哀民生之多艱。
」」
<!--Euqals to-->
<blockquote>
長太息以掩涕兮,哀民生之多艱。
</blockquote>

List

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

Comments start with 批: or 疏::

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

批:註釋也
<!--Euqals to-->
<!--註釋也-->

Images

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

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

Example:

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

URL

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)

Inline

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 Block

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

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

Example:

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

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

jian's People

Contributors

meowcolm024 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.