+" text"
}
}
+ tr {
+ td { +"[code_block]Text goes here[/code_block]" }
+ td {
+ span {
+ style = "font-family:JetBrains Mono"
+ +"Marks a block of text as pre-formatted and puts it into monospaced font"
+ }
+ }
+ }
tr {
td { +"[align=(left, center, right, or justify)]Text goes here[/align]" }
td {
}
}
}
+ tr {
+ td { +"[epoch]893078880000[/epoch]" }
+ td {
+ +"Takes an offset of "
+ strong { +"milliseconds" }
+ +" counted from "
+ a(href = "https://en.wikipedia.org/wiki/Unix_time") {
+ rel = "nofollow"
+ +"Unix time"
+ }
+ +", and converts it to a client-localized date-time."
+ }
+ }
tr {
td { +"[lang=tylan]Rheagda Tulasra[/lang]" }
td {
INLINE,
BLOCK,
ITEM,
- LAYOUT;
+ LAYOUT,
+ ;
fun combine(env: LexerTagEnvironment<HtmlBuilderContext, HtmlBuilderSubject>, subNodes: ParserTree) = when (this) {
INLINE -> HtmlLexerProcessor.combineInline(env, subNodes)
COLOR(HtmlTagLexerTag(attributes = ::processColor, tagMode = HtmlTagMode.INLINE, tagCreator = TagConsumer<*>::span.toTagCreator())),
IPA(HtmlTagLexerTag(attributes = mapOf("style" to "font-family:DejaVu Sans"), tagMode = HtmlTagMode.INLINE, tagCreator = TagConsumer<*>::span.toTagCreator())),
CODE(HtmlTagLexerTag(attributes = mapOf("style" to "font-family:JetBrains Mono"), tagMode = HtmlTagMode.INLINE, tagCreator = TagConsumer<*>::span.toTagCreator())),
- CODE_BLOCK(HtmlTagLexerTag(tagCreator = { block ->
- div {
- style = "font-family:JetBrains Mono"
- pre {
- block()
+ CODE_BLOCK(HtmlLexerTag { _, _, subNodes ->
+ val blockText = subNodes.unparse()
+ ({
+ div {
+ style = "font-family:JetBrains Mono"
+ pre {
+ +blockText
+ }
}
- }
- })),
+ })
+ }),
BLOCKQUOTE(HtmlTagLexerTag(tagCreator = TagConsumer<*>::blockQuote.toTagCreator())),
ERROR(HtmlTagLexerTag(attributes = mapOf("style" to "color: #f00"), tagCreator = TagConsumer<*>::div.toTagCreator())),
CODE(FactbookFormattingTag.CODE.type),
CODE_BLOCK(FactbookFormattingTag.CODE_BLOCK.type),
- ERROR(HtmlTagLexerTag(attributes = mapOf("style" to "color: #f00"), tagCreator = TagConsumer<*>::div.toTagCreator())),
-
ALIGN(FactbookFormattingTag.ALIGN.type),
ASIDE(FactbookFormattingTag.ASIDE.type),