package cmarkit
-
cmarkit
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Code blocks.
type fenced_layout = {
indent : Layout.indent;
Indent to opening fence
*)opening_fence : Layout.string node;
Opening fence (before info string).
*)closing_fence : Layout.string node option;
Closing fence (if any).
*)}
The type for fenced code block layouts.
The type for code block layouts.
val make : ?layout:layout -> ?info_string:string node -> Block_line.t list -> t
make ?layout ?info_string code
is a code block with given parameters. layout
defaults to a fenced layout. If layout
is `Indented
and an info_string
is provided, the layout is switched to `Fenced
.
info_string cb
is the info string of cb
, if any.
val code : t -> Block_line.t list
code cb
are the code lines of cb
.
val make_fence : t -> Layout.char * Layout.count
make_fence cb
is a fence character and count suitable for cb
.
language_of_info_string s
extracts a (non-empty) language, the first word of s
and a trimmed remainder. Assumes s
is String.trim
ed which is what info_string
gives you.