Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Make more things public, add default rule for strikethrough
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-makes-code committed Feb 14, 2023
1 parent 29843b6 commit 91973c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = "dev.proxyfox"
version = "1.0"
version = "1.1"

repositories {
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/dev/proxyfox/markt/Node.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public interface MarkdownNode {
public fun toTreeString(indent: Int = 0): String
}

public class StringNode(private val value: String) : MarkdownNode {
public class StringNode(public val value: String) : MarkdownNode {
override val length: Int = value.length
override val trueLength: Int = value.length

Expand Down Expand Up @@ -94,7 +94,7 @@ public class SymbolNode(public val left: String, public val right: String = left
}
}

public class HyperlinkNode(private val url: String, private val nodes: MutableList<MarkdownNode> = arrayListOf()) : MarkdownNode {
public class HyperlinkNode(public val url: String, public val nodes: MutableList<MarkdownNode> = arrayListOf()) : MarkdownNode {
override val length: Int
get() = nodes.sumOf(MarkdownNode::length)
override val trueLength: Int
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/dev/proxyfox/markt/Parser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public object MarkdownParser {
+BracketRule("||")
+BracketRule("_")
+BracketRule("__")
+BracketRule("~~")
+HyperlinkRule
+MentionRule
}
Expand Down

0 comments on commit 91973c4

Please sign in to comment.