markdown :: TokenHTML :: defaultinit
core :: Object :: class_factory
Implementation used byget_class to create the specific class.
			markdown :: Token :: defaultinit
markdown :: TokenHTML :: defaultinit
core :: Object :: defaultinit
MarkdownEmitter::decorator.
			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.
			self in the original input.
			markdown :: Token :: location=
Location ofself in the original input.
			core :: Object :: output_class_name
Display class name on stdout (debug only).
# A HTML/XML token.
class TokenHTML
	super Token
	redef fun emit(v) do
		var tmp = new FlatBuffer
		var b = check_html(v, tmp, v.current_text.as(not null), v.current_pos)
		if b > 0 then
			v.add tmp
			v.current_pos = b
		else
			v.decorator.escape_char(v, char)
		end
	end
	# Is the HTML valid?
	# Also take care of link and mailto shortcuts.
	private fun check_html(v: MarkdownProcessor, out: FlatBuffer, md: Text, start: Int): Int do
		# check for auto links
		var tmp = new FlatBuffer
		var pos = md.read_until(tmp, start + 1, ':', ' ', '>', '\n')
		if pos != -1 and md[pos] == ':' and tmp.is_link_prefix then
			pos = md.read_until(tmp, pos, '>')
			if pos != -1 then
				var link = tmp.write_to_string
				v.decorator.add_link(v, link, link, null)
				return pos
			end
		end
		# TODO check for mailto
		# check for inline html
		if start + 2 < md.length then
			return md.read_xml(out, start, true)
		end
		return -1
	end
end
					lib/markdown/markdown.nit:2212,1--2248,3