types

Option

class cmarkwrapper.types.Option(value)

An enumeration.

OPT_DEFAULT = 0

Default options.

OPT_HARDBREAKS = 4

Render “soft break” nodes as hard line breaks.

OPT_NOBREAKS = 16

Render “soft break” nodes as spaces.

OPT_SMART = 1024

Render straight quotes as curly, --- as em dash, -- as en dash.

OPT_SOURCEPOS = 2

Render with “sourcepos” information.

OPT_UNSAFE = 131072

渲染时允许原始的HTML和不安全的链接

IterEvent

class cmarkwrapper.types.IterEvent(value)

迭代事件类型

EVENT_DONE = 1

迭代完成

EVENT_ENTER = 2

进入节点

EVENT_EXIT = 3

退出节点

NodeType

class cmarkwrapper.types.NodeType(value)

节点类型

NODE_BLOCK_QUOTE = 2

引用块

NODE_CODE = 14

行内代码

NODE_CODE_BLOCK = 5

代码块

NODE_CUSTOM_BLOCK = 7

Block of custom.

NODE_CUSTOM_INLINE = 16

Inline custom.

NODE_DOCUMENT = 1

文档

NODE_EMPH = 17

强调

NODE_FIRST_BLOCK = 1

起始块

NODE_FIRST_INLINE = 11

First inline.

NODE_HEADING = 9

标题

NODE_HTML_BLOCK = 6

原始HTML块

NODE_HTML_INLINE = 15

行内HTML

NODE_IMAGE = 20

图片

NODE_ITEM = 4

List item.

NODE_LAST_BLOCK = 10

结束块

NODE_LAST_INLINE = 20

Last inline.

NODE_LINEBREAK = 13

Line break.

链接

NODE_LIST = 3

列表

NODE_NONE = 0

Error status.

NODE_PARAGRAPH = 8

段落

NODE_SOFTBREAK = 12

Soft break.

NODE_STRONG = 18

Strong emphasis.

NODE_TEXT = 11

文本

NODE_THEMATIC_BREAK = 10

Thematic break.

ListType

class cmarkwrapper.types.ListType(value)

An enumeration.

BULLET_LIST = 1

无序号列表

NO_LIST = 0

非列表

ORDERED_LIST = 2

带序号列表

Delimiter

class cmarkwrapper.types.Delimiter(value)

分隔符

NO_DELIM = 0

非分隔符

PAREN_DELIM = 2

)

PERIOD_DELIM = 1

.

LineBreaks

class cmarkwrapper.types.LineBreaks(value)

换行符将被渲染成?

hard = 'hard'

As <br />s.

soft = 'soft'

As \ns.