summaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/blog
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/blog')
-rw-r--r--src/main/kotlin/moe/nea/blog/md/ItalicsParser.kt7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/kotlin/moe/nea/blog/md/ItalicsParser.kt b/src/main/kotlin/moe/nea/blog/md/ItalicsParser.kt
index 6fce529..5448f5f 100644
--- a/src/main/kotlin/moe/nea/blog/md/ItalicsParser.kt
+++ b/src/main/kotlin/moe/nea/blog/md/ItalicsParser.kt
@@ -2,7 +2,7 @@ package moe.nea.blog.md
object ItalicsParser : InlineParser {
override fun detect(lookback: MarkdownFormat, rest: String): Boolean {
- return (lookback is Whitespace || lookback is Begin) && "\\*+[^* ].*".toRegex().matches(rest)
+ return "\\*+[^* ].*".toRegex().matches(rest)
}
override val specialSyntax: Set<Char>
@@ -43,7 +43,10 @@ object ItalicsParser : InlineParser {
}
// TODO: better begin
- val (secondSequence, _remainingText) = parser.parseInlineTextUntil(remainingText, Begin()) { lookback, remaining ->
+ val (secondSequence, _remainingText) = parser.parseInlineTextUntil(
+ remainingText,
+ Begin()
+ ) { lookback, remaining ->
lookback !is Whitespace && remaining.startsWith("*")
}
remainingText = _remainingText