markdown2 :: MdFencedCodeBlock :: fence_char=
Fence charactermarkdown2 :: MdFencedCodeBlock :: fence_indent=
Fence indentation levelmarkdown2 :: MdFencedCodeBlock :: fence_length=
Fence lengthmarkdown2 $ MdFencedCodeBlock :: SELF
Type of this instance, automatically specialized in every classmarkdown2 :: markdown_latex_rendering $ MdFencedCodeBlock :: render_latex
Renderself
as HTML
markdown2 :: markdown_md_rendering $ MdFencedCodeBlock :: render_md
Renderself
as Markdown
markdown2 $ MdFencedCodeBlock :: to_s_attrs
Returnsself
attributes as a String
markdown2 :: MdBlock :: can_contain
Can this block containblock
?
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
markdown2 :: MdNode :: defaultinit
core :: Object :: defaultinit
markdown2 :: MdBlock :: defaultinit
markdown2 :: MdCodeBlock :: defaultinit
markdown2 :: MdFencedCodeBlock :: fence_char=
Fence charactermarkdown2 :: MdFencedCodeBlock :: fence_indent=
Fence indentation levelmarkdown2 :: MdFencedCodeBlock :: fence_length=
Fence lengthmarkdown2 :: MdBlock :: is_container=
Can this block contain other blocks?core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
markdown2 :: MdNode :: location=
Node location in original markdowncore :: Object :: output_class_name
Display class name on stdout (debug only).markdown2 :: MdNode :: post_process
Accept the visit of aMdPostProcessor
markdown2 :: MdNode :: render_raw_text
Renderself
as raw text
# A code block that starts with a fence
class MdFencedCodeBlock
super MdCodeBlock
# Fence character
var fence_char: Char
# Fence length
var fence_length: Int
# Fence indentation level
var fence_indent: Int
redef fun to_s_attrs do return "{super}, fence_char={fence_char}, fence_length={fence_length}, fence_indent={fence_indent}"
end
lib/markdown2/markdown_ast.nit:246,1--260,3
redef class MdFencedCodeBlock
redef fun render_latex(v) do
var info = self.info
var lstlistings = v.use_listings
var directive = if lstlistings then "lstlisting" else "verbatim"
v.add_line
v.add_indent
v.add_raw "\\begin\{{directive}\}"
if lstlistings and info != null and not info.is_empty then
v.add_raw "[language={info}]"
end
v.add_line
v.add_raw literal or else ""
v.add_line
v.add_indent
v.add_raw "\\end\{{directive}\}"
v.add_line
end
end
lib/markdown2/markdown_latex_rendering.nit:205,1--223,3
redef class MdFencedCodeBlock
redef fun render_md(v) do
var info = self.info
v.add_indent
v.add_raw fence_char.to_s * fence_length
v.add_raw info or else ""
for line in (literal or else "").split("\n") do
v.add_line
if not line.is_empty then
v.add_indent
end
v.add_raw line
end
v.add_indent
v.add_raw fence_char.to_s * fence_length
v.add_line
end
end
lib/markdown2/markdown_md_rendering.nit:131,1--148,3