aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/pages
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-04-23 23:26:36 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-04-30 12:31:05 +0200
commit423e7ee17c2cb28d4a34b91231560eff0656ffc0 (patch)
tree7e02e74d40ce0807011d7663c30ae2489ae08e2d /core/src/main/kotlin/pages
parent3cd12e14d7465c197d4a6fc76d073328a46db349 (diff)
downloaddokka-423e7ee17c2cb28d4a34b91231560eff0656ffc0.tar.gz
dokka-423e7ee17c2cb28d4a34b91231560eff0656ffc0.tar.bz2
dokka-423e7ee17c2cb28d4a34b91231560eff0656ffc0.zip
Fixing GFM components display
Diffstat (limited to 'core/src/main/kotlin/pages')
-rw-r--r--core/src/main/kotlin/pages/ContentNodes.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt
index cfcd4069..c0576006 100644
--- a/core/src/main/kotlin/pages/ContentNodes.kt
+++ b/core/src/main/kotlin/pages/ContentNodes.kt
@@ -185,6 +185,8 @@ enum class TextStyle : Style {
Bold, Italic, Strong, Strikethrough, Paragraph, Block, Monospace, Indented
}
+object CommentTable: Style
+
fun ContentNode.dfs(predicate: (ContentNode) -> Boolean): ContentNode? = if (predicate(this)) {
this
} else {
@@ -194,3 +196,5 @@ fun ContentNode.dfs(predicate: (ContentNode) -> Boolean): ContentNode? = if (pre
null
}
}
+
+fun ContentNode.hasStyle(style: Style) = this.style.contains(style)