Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add test case to verify rendering of non-English content in BundledMarkdownRender #1142

Merged
merged 1 commit into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,77 @@ internal class BundledMarkdownRenderTest : BaseContextTest() {
"| cellX | cellY |</p>", html
)
}

@Test
fun testRenderNonEnglishContent() {
@Language("Markdown")
val mdNonEnglish =
"""
# Überschrift
## Titel
- Erster
- Zweiter

---

## Второй абзац
1. первый
2. второй

---

> 注意:这是一个演示

```java
public class Beispiel {
private String zeichen;

public String getZeichen() {
return this.zeichen;
}
}
```

---

| заголовокA | заголовокB |
| ------ | ------ |
| ячейкаA | ячейкаB |
"""

val htmlNonEnglish = markdownRender.render(mdNonEnglish)
assertEquals(
"<pre><code> # Überschrift\n" +
" ## Titel\n" +
" - Erster\n" +
" - Zweiter\n" +
" \n" +
" ---\n" +
" \n" +
" ## Второй абзац\n" +
" 1. первый\n" +
" 2. второй\n" +
" \n" +
" ---\n" +
" \n" +
" &gt; 注意:这是一个演示\n" +
" \n" +
" ```java\n" +
" public class Beispiel {\n" +
" private String zeichen;\n" +
" \n" +
" public String getZeichen() {\n" +
" return this.zeichen;\n" +
" }\n" +
" }\n" +
" ```\n" +
" \n" +
" ---\n" +
" \n" +
" | заголовокA | заголовокB |\n" +
" | ------ | ------ |\n" +
" | ячейкаA | ячейкаB |\n" +
"</code></pre>", htmlNonEnglish
)
}
}
Loading
Loading