The Craft Markdown and The Github Markdown

✍🏼 写于 2022年01月19日    💡 更新于 2022年01月19日
❗️ 注意:离本文创建时间已经过去了 天,请注意时效性
🖥  说明:This article is used to experiment with some issues with the Craft Markdown API, as I think some of its blocks are not converted correctly.

This article shows the Markdown rendering effect of Github, this address is the rendering effect of Craft Web client, you can see the difference between the two is still quite obvious.

TITLES

Title

Subtitle

Heading

CONTENT

Strong

Body

Caption

GROUPS

Page

This is an empty page!

Card

This is an empty Card!


TEXT STYLE

Bold

Italic

Strike

InlineCode

  • Todo

Toggle

  • Unorderlist One

  • Unorderlist Two

  1. Orderlist One

  2. Orderlist Two

Align Left

Align Center

Align Right

This is a sentence with an indent


DECORATIONS

Decorations Focus

Decorations Block

INSERT BLOCK

Plain Text

Table  
   

Image

1
2
3
// Code Block with Javascript language

let CodeBlock = "Hello Craft!";
1
The Formula

Devide👇🏻





NESTING

Decoration Focus & Block

  1. Decoration Focus & List

  2. Decoration Block & List

…too many to show


What I Think?

Important part:

  1. The Decoration,no matter Focus or Block should converted to blockquote in markdown syntax.

  2. The Caption, there is no corresponding markdown syntax, just render as Body, not H5.

  3. The CodeBlock, should take the language like ```javascript.

  4. The nesting List, not the flat list!

Not important part:

  1. The Align, ignore it.

  2. The Indent, ignore it.

  3. The formula, emmmm ignore it.

What I Plan to do?

I will create a npm package to convert Craft data to Github Markdow correctly 🤪.

Anyone any idea?

- EOF -
本文最先发布在: The Craft Markdown and The Github Markdown - Xheldon Blog