From 32cfff6d3dcb099e891e56b969c3c561d8fd9769 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Tue, 8 Nov 2016 21:32:00 +0300 Subject: Fix for KT-14603 Do not escape html inside code blocks in markdown (#112) --- core/testdata/format/codeBlock.md | 2 +- core/testdata/format/codeBlockNoHtmlEscape.kt | 15 +++++++++++++++ core/testdata/format/codeBlockNoHtmlEscape.md | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 core/testdata/format/codeBlockNoHtmlEscape.kt create mode 100644 core/testdata/format/codeBlockNoHtmlEscape.md (limited to 'core/testdata') diff --git a/core/testdata/format/codeBlock.md b/core/testdata/format/codeBlock.md index 55a054f6..d64fb9fd 100644 --- a/core/testdata/format/codeBlock.md +++ b/core/testdata/format/codeBlock.md @@ -22,6 +22,6 @@ fun readFile(name: String): String {...} Check output of ``` brainfuck -++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. +++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. ``` diff --git a/core/testdata/format/codeBlockNoHtmlEscape.kt b/core/testdata/format/codeBlockNoHtmlEscape.kt new file mode 100644 index 00000000..5f48b39c --- /dev/null +++ b/core/testdata/format/codeBlockNoHtmlEscape.kt @@ -0,0 +1,15 @@ +/** + * Try to make this check pass + * ``` + * if(1 > 2) + * ``` + * Or just piece of html + * ``` + *

1 = 3

+ * ``` + */ +fun hackTheArithmetic(){ + valueOf(1) { + set(3) + } +} \ No newline at end of file diff --git a/core/testdata/format/codeBlockNoHtmlEscape.md b/core/testdata/format/codeBlockNoHtmlEscape.md new file mode 100644 index 00000000..2622ef38 --- /dev/null +++ b/core/testdata/format/codeBlockNoHtmlEscape.md @@ -0,0 +1,18 @@ +[test](test/index) / [hackTheArithmetic](test/hack-the-arithmetic) + +# hackTheArithmetic + +`fun hackTheArithmetic(): Unit` + +Try to make this check pass + +``` +if(1 > 2) +``` + +Or just piece of html + +``` +

1 = 3

+``` + -- cgit