|
1 | 1 | package com.vladsch.flexmark.core.test.util.parser; |
2 | 2 |
|
| 3 | +import org.jetbrains.annotations.NotNull; |
| 4 | +import org.jetbrains.annotations.Nullable; |
| 5 | +import org.junit.Test; |
| 6 | + |
3 | 7 | import com.vladsch.flexmark.html.HtmlRenderer; |
4 | 8 | import com.vladsch.flexmark.parser.Parser; |
5 | | -import com.vladsch.flexmark.test.util.*; |
| 9 | +import com.vladsch.flexmark.test.util.FlexmarkSpecExampleRenderer; |
| 10 | +import com.vladsch.flexmark.test.util.RenderingTestCase; |
| 11 | +import com.vladsch.flexmark.test.util.SpecExampleRenderer; |
| 12 | +import com.vladsch.flexmark.test.util.Strings; |
| 13 | +import com.vladsch.flexmark.test.util.TestUtils; |
6 | 14 | import com.vladsch.flexmark.test.util.spec.SpecExample; |
7 | 15 | import com.vladsch.flexmark.util.data.DataHolder; |
8 | 16 | import com.vladsch.flexmark.util.data.DataSet; |
9 | 17 | import com.vladsch.flexmark.util.data.MutableDataSet; |
10 | | -import org.jetbrains.annotations.NotNull; |
11 | | -import org.jetbrains.annotations.Nullable; |
12 | | -import org.junit.Test; |
13 | 18 |
|
14 | 19 | final public class SpecialInputTest extends RenderingTestCase { |
15 | 20 | final private static DataHolder OPTIONS = new MutableDataSet() |
@@ -121,7 +126,19 @@ public void linkLabelLength() { |
121 | 126 |
|
122 | 127 | @Test |
123 | 128 | public void manyUnderscores() { |
124 | | - assertRendering(Strings.repeat("_", 1000), "<hr />"); |
| 129 | + assertRendering(Strings.repeat("_", 100000), "<hr />"); |
| 130 | + } |
| 131 | + |
| 132 | + @Test |
| 133 | + public void uncompletedHugeHtmlTag() { |
| 134 | + assertRendering("<" + Strings.repeat("a", 1000000), "<" + Strings.repeat("a", 1000000)); |
| 135 | + } |
| 136 | + |
| 137 | + @Test |
| 138 | + public void hugeDataUrlInLink() { |
| 139 | + String url = "https://example.com/" + "A".repeat(5000); |
| 140 | + String markdown = "[link]: <" + url + ">"; |
| 141 | + assertRendering(markdown, "<a href=\"" + url + "\">link</a>"); |
125 | 142 | } |
126 | 143 |
|
127 | 144 | @Nullable |
|
0 commit comments