From 423e7ee17c2cb28d4a34b91231560eff0656ffc0 Mon Sep 17 00:00:00 2001 From: Błażej Kardyś Date: Thu, 23 Apr 2020 23:26:36 +0200 Subject: Fixing GFM components display --- core/src/main/kotlin/pages/ContentNodes.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/src/main/kotlin/pages') 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) -- cgit