-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
...and bump commonmark spec to 0.31.2. One test it ignored due to a complex case of parsing emphasis: https://spec.commonmark.org/0.31.2/#emphasis-and-strong-emphasis
- Loading branch information
Oleg Baskakov
committed
Mar 19, 2024
1 parent
d42aff1
commit c1fffa0
Showing
7 changed files
with
424 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...src/test/kotlin/org/jetbrains/jewel/markdown/MarkdownProcessorDocumentParsingExtraTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package org.jetbrains.jewel.markdown | ||
|
||
import org.jetbrains.jewel.markdown.processing.MarkdownProcessor | ||
import org.junit.Test | ||
|
||
class MarkdownProcessorDocumentParsingExtraTest { | ||
|
||
private val processor = MarkdownProcessor() | ||
|
||
@Test | ||
fun `should parse spec sample 461b correctly (Emphasis and strong emphasis)`() { | ||
val parsed = processor.processMarkdownDocument("*_foo *bar*_*") | ||
|
||
/* | ||
* Expected HTML: | ||
* <p><em><em>foo <em>bar</em></em></em></p> | ||
*/ | ||
parsed.assertEquals(paragraph("*_foo *bar*_*")) | ||
} | ||
|
||
@Test | ||
fun `should parse spec sample 461c correctly (Emphasis and strong emphasis)`() { | ||
val parsed = processor.processMarkdownDocument("**foo *bar***") | ||
|
||
/* | ||
* Expected HTML: | ||
* <p><strong>foo <em>bar</em></strong></p> | ||
*/ | ||
parsed.assertEquals(paragraph("**foo *bar***")) | ||
} | ||
|
||
@Test | ||
fun `should parse spec sample 461d correctly (Emphasis and strong emphasis)`() { | ||
val parsed = processor.processMarkdownDocument("*_foo *bar* a_*") | ||
|
||
/* | ||
* Expected HTML: | ||
* <p><em><em>foo <em>bar</em> a</em></em></p> | ||
*/ | ||
parsed.assertEquals(paragraph("*_foo *bar* a_*")) | ||
} | ||
|
||
@Test | ||
fun `should parse spec sample 461e correctly (Emphasis and strong emphasis)`() { | ||
val parsed = processor.processMarkdownDocument("**foo *bar* a**") | ||
|
||
/* | ||
* Expected HTML: | ||
* <p><strong>foo <em>bar</em> a</strong></p> | ||
*/ | ||
parsed.assertEquals(paragraph("**foo *bar* a**")) | ||
} | ||
|
||
@Test | ||
fun `should parse spec sample 461f correctly (Emphasis and strong emphasis)`() { | ||
val parsed = processor.processMarkdownDocument("*_*foo *bar* a*_*") | ||
|
||
/* | ||
* Expected HTML: | ||
* <p><strong>foo <em>bar</em> a</strong></p> | ||
*/ | ||
parsed.assertEquals(paragraph("*_*foo *bar* a*_*")) | ||
} | ||
} |
Oops, something went wrong.