diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-04-23 23:26:36 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-04-30 12:31:05 +0200 |
commit | 423e7ee17c2cb28d4a34b91231560eff0656ffc0 (patch) | |
tree | 7e02e74d40ce0807011d7663c30ae2489ae08e2d /core/src/main/kotlin/pages | |
parent | 3cd12e14d7465c197d4a6fc76d073328a46db349 (diff) | |
download | dokka-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.kt | 4 |
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) |