From fe16ef077f82e74b9970bc65c4631e2d715778ef Mon Sep 17 00:00:00 2001 From: Tomachi <8929706+book000@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:36:19 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20`-#`=20=E3=81=AE=E3=83=98=E3=83=83?= =?UTF-8?q?=E3=83=80=E3=83=BC=E3=81=AB=E5=AF=BE=E5=BF=9C=20(#186)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/com/jaoafa/vcspeaker/tts/markdown/Line.kt | 1 + src/test/kotlin/processors/MarkdownFormatProcessorTest.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/jaoafa/vcspeaker/tts/markdown/Line.kt b/src/main/kotlin/com/jaoafa/vcspeaker/tts/markdown/Line.kt index 1d4becd2..f1aba452 100644 --- a/src/main/kotlin/com/jaoafa/vcspeaker/tts/markdown/Line.kt +++ b/src/main/kotlin/com/jaoafa/vcspeaker/tts/markdown/Line.kt @@ -37,6 +37,7 @@ enum class LineEffect(val regex: Regex) { Heading1(Regex("^#$")), Heading2(Regex("^##$")), Heading3(Regex("^###$")), + SmallHeading(Regex("^-#$")), Quote(Regex("^>$")), BulletList(Regex("^[*-]$")), NumberedList(Regex("^\\d+\\.$")) diff --git a/src/test/kotlin/processors/MarkdownFormatProcessorTest.kt b/src/test/kotlin/processors/MarkdownFormatProcessorTest.kt index 36f94fa7..4445dfec 100644 --- a/src/test/kotlin/processors/MarkdownFormatProcessorTest.kt +++ b/src/test/kotlin/processors/MarkdownFormatProcessorTest.kt @@ -145,6 +145,7 @@ class MarkdownFormatProcessorTest : FunSpec({ #### Header 4 ##### Header 5 ###### Header 6 + -# Small header - List item 1 - List item 2 - List item 3 @@ -161,7 +162,7 @@ class MarkdownFormatProcessorTest : FunSpec({ """.trimIndent(), voice ) - processedText shouldBe "Header 1 Header 2 Header 3 #### Header 4 ##### Header 5 ###### Header 6 List item 1 List item 2 List item 3 Numbered list item 1 Numbered list item 2 Numbered list item 3 Blockquote Code" + processedText shouldBe "Header 1 Header 2 Header 3 #### Header 4 ##### Header 5 ###### Header 6 Small header List item 1 List item 2 List item 3 Numbered list item 1 Numbered list item 2 Numbered list item 3 Blockquote Code" processedVoice shouldBe voice }