A link or image

Introduced properties

init defaultinit(location: MdLocation, destination: String, title: nullable String)

markdown2 :: MdLinkOrImage :: defaultinit

fun destination: String

markdown2 :: MdLinkOrImage :: destination

Link destination
fun destination=(destination: String)

markdown2 :: MdLinkOrImage :: destination=

Link destination
fun has_brackets: Bool

markdown2 :: MdLinkOrImage :: has_brackets

Is the destination between pointy brackets <dest>
fun has_brackets=(has_brackets: Bool)

markdown2 :: MdLinkOrImage :: has_brackets=

Is the destination between pointy brackets <dest>
fun title: nullable String

markdown2 :: MdLinkOrImage :: title

Link title
fun title=(title: nullable String)

markdown2 :: MdLinkOrImage :: title=

Link title

Redefined properties

redef type SELF: MdLinkOrImage

markdown2 $ MdLinkOrImage :: SELF

Type of this instance, automatically specialized in every class
redef fun render_man(v: ManRenderer)

markdown2 :: markdown_man_rendering $ MdLinkOrImage :: render_man

Render self as Manpage format
redef fun render_md(v: MarkdownRenderer)

markdown2 :: markdown_md_rendering $ MdLinkOrImage :: render_md

Render self as Markdown
redef fun to_s_attrs: String

markdown2 $ MdLinkOrImage :: to_s_attrs

Returns self attributes as a String

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
fun append_child(child: MdNode)

markdown2 :: MdNode :: append_child

Append a child to self
fun children: Array[MdNode]

markdown2 :: MdNode :: children

Children nodes of self
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun debug

markdown2 :: MdNode :: debug

Print self AST
init defaultinit(location: MdLocation, destination: String, title: nullable String)

markdown2 :: MdLinkOrImage :: defaultinit

fun destination: String

markdown2 :: MdLinkOrImage :: destination

Link destination
fun destination=(destination: String)

markdown2 :: MdLinkOrImage :: destination=

Link destination
fun first_child: nullable MdNode

markdown2 :: MdNode :: first_child

First child
fun first_child=(first_child: nullable MdNode)

markdown2 :: MdNode :: first_child=

First child
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun has_brackets: Bool

markdown2 :: MdLinkOrImage :: has_brackets

Is the destination between pointy brackets <dest>
fun has_brackets=(has_brackets: Bool)

markdown2 :: MdLinkOrImage :: has_brackets=

Is the destination between pointy brackets <dest>
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun insert_after(sibling: MdNode)

markdown2 :: MdNode :: insert_after

Insert sibling after self.
fun insert_before(sibling: MdNode)

markdown2 :: MdNode :: insert_before

Insert sibling before self.
fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun last_child: nullable MdNode

markdown2 :: MdNode :: last_child

Last child
fun last_child=(last_child: nullable MdNode)

markdown2 :: MdNode :: last_child=

Last child
fun location: MdLocation

markdown2 :: MdNode :: location

Node location in original markdown
protected fun location=(location: MdLocation)

markdown2 :: MdNode :: location=

Node location in original markdown
fun next: nullable MdNode

markdown2 :: MdNode :: next

Next node
fun next=(next: nullable MdNode)

markdown2 :: MdNode :: next=

Next node
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun parent: nullable MdNode

markdown2 :: MdNode :: parent

Node parent
fun parent=(parent: nullable MdNode)

markdown2 :: MdNode :: parent=

Node parent
fun post_process(v: MdPostProcessor)

markdown2 :: MdNode :: post_process

Accept the visit of a MdPostProcessor
fun prepend_child(child: MdNode)

markdown2 :: MdNode :: prepend_child

Prepend a child to self
fun prev: nullable MdNode

markdown2 :: MdNode :: prev

Previous node
fun prev=(prev: nullable MdNode)

markdown2 :: MdNode :: prev=

Previous node
fun raw_text: String

markdown2 :: MdNode :: raw_text

Return self as raw text
fun render_html(v: HtmlRenderer)

markdown2 :: MdNode :: render_html

Render self as HTML
fun render_latex(v: LatexRenderer)

markdown2 :: MdNode :: render_latex

Render self as HTML
fun render_man(v: ManRenderer)

markdown2 :: MdNode :: render_man

Render self as Manpage format
fun render_md(v: MarkdownRenderer)

markdown2 :: MdNode :: render_md

Render self as Markdown
fun render_raw_text(v: RawTextVisitor)

markdown2 :: MdNode :: render_raw_text

Render self as raw text
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
fun title: nullable String

markdown2 :: MdLinkOrImage :: title

Link title
fun title=(title: nullable String)

markdown2 :: MdLinkOrImage :: title=

Link title
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
fun to_s_attrs: String

markdown2 :: MdNode :: to_s_attrs

Returns self attributes as a String
fun visit_all(v: MdVisitor)

markdown2 :: MdNode :: visit_all

Visit all children or self
package_diagram markdown2::MdLinkOrImage MdLinkOrImage markdown2::MdNode MdNode markdown2::MdLinkOrImage->markdown2::MdNode core::Object Object markdown2::MdNode->core::Object ...core::Object ... ...core::Object->core::Object markdown2::MdImage MdImage markdown2::MdImage->markdown2::MdLinkOrImage markdown2::MdLink MdLink markdown2::MdLink->markdown2::MdLinkOrImage

Ancestors

interface Object

core :: Object

The root of the class hierarchy.

Parents

abstract class MdNode

markdown2 :: MdNode

An abstract node

Children

class MdImage

markdown2 :: MdImage

An image

Class definitions

markdown2 $ MdLinkOrImage
# A link or image
abstract class MdLinkOrImage
	super MdNode

	# Link destination
	var destination: String is writable

	# Link title
	var title: nullable String is writable

	# Is the `destination` between pointy brackets `<dest>`
	var has_brackets = false is writable

	redef fun to_s_attrs do return "{super}, destination={destination}, title={title or else "null"}"
end
lib/markdown2/markdown_ast.nit:432,1--446,3

markdown2 :: markdown_man_rendering $ MdLinkOrImage
redef class MdLinkOrImage
	redef fun render_man(v) do
		var title = self.title

		visit_all(v)
		v.add " ("
		v.add destination
		if title != null and not title.is_empty then
			v.add " "
			v.add title
		end
		v.add ")"
	end
end
lib/markdown2/markdown_man_rendering.nit:215,1--228,3

markdown2 :: markdown_md_rendering $ MdLinkOrImage
redef class MdLinkOrImage
	redef fun render_md(v) do
		var title = self.title
		v.add_raw "["
		visit_all(v)
		v.add_raw "]"
		v.add_raw "("
		if has_brackets then
			v.add_raw "<"
		end
		v.add_raw destination
		if has_brackets then
			v.add_raw ">"
		end
		if title != null and not title.is_empty then
			v.add_raw " \""
			v.add_raw title.replace("\"", "\\\"")
			v.add_raw "\""
		end
		v.add_raw ")"
	end
end
lib/markdown2/markdown_md_rendering.nit:327,1--348,3