diff --git a/markwon/src/test/java/ru/noties/markwon/renderer/visitor/TestDataReader.java b/markwon/src/test/java/ru/noties/markwon/renderer/visitor/TestDataReader.java index f9f1dbef..32edc4d2 100644 --- a/markwon/src/test/java/ru/noties/markwon/renderer/visitor/TestDataReader.java +++ b/markwon/src/test/java/ru/noties/markwon/renderer/visitor/TestDataReader.java @@ -107,7 +107,16 @@ abstract class TestDataReader { @NonNull private TestData testData(@NonNull JsonObject jsonObject) { - final String description = jsonObject.get("description").getAsString(); + final String description; + { + final JsonElement element = jsonObject.get("description"); + if (element != null + && element.isJsonPrimitive()) { + description = element.getAsString(); + } else { + description = null; + } + } final String input = jsonObject.get("input").getAsString(); if (TextUtils.isEmpty(input)) { diff --git a/markwon/src/test/resources/tests/second.yaml b/markwon/src/test/resources/tests/second.yaml new file mode 100644 index 00000000..01f8f411 --- /dev/null +++ b/markwon/src/test/resources/tests/second.yaml @@ -0,0 +1,25 @@ +input: |- + First **line** is *always* + ~~strike~~ down + + > Some quote here! + + # Header 1 + ## Header 2 + + and `some code` and more: + + ```java + the code in multiline + ``` + +output: + - text: "First " + - b: "line" + - text: " " + - i: "always" + - text: " " + - s: "strike" + - text: " down\n\n" + - blockquote: "Some quote here!" + - text: "\n\n" \ No newline at end of file