From 7922e2a940f91b587c70dfb3d41e0048bc93a19e Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Tue, 1 Nov 2016 20:31:16 +0300 Subject: Fix for GH #97 : Preserve language name of fenced code block for highlight --- core/testdata/comments/codeBlockComment.kt | 14 ++++++++++++++ core/testdata/format/codeBlock.html | 20 ++++++++++++++++++++ core/testdata/format/codeBlock.kt | 9 +++++++++ core/testdata/format/codeBlock.md | 12 ++++++++++-- 4 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 core/testdata/comments/codeBlockComment.kt create mode 100644 core/testdata/format/codeBlock.html (limited to 'core/testdata') diff --git a/core/testdata/comments/codeBlockComment.kt b/core/testdata/comments/codeBlockComment.kt new file mode 100644 index 00000000..aa5f5ffc --- /dev/null +++ b/core/testdata/comments/codeBlockComment.kt @@ -0,0 +1,14 @@ +/** + * ``` brainfuck + * ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. + * ``` + */ +val prop1 = "" + + +/** + * ``` + * a + b - c + * ``` + */ +val prop2 = "" \ No newline at end of file diff --git a/core/testdata/format/codeBlock.html b/core/testdata/format/codeBlock.html new file mode 100644 index 00000000..b3b65dba --- /dev/null +++ b/core/testdata/format/codeBlock.html @@ -0,0 +1,20 @@ + + + + + +test / Throws
+
+

Throws

+class Throws +

This annotation indicates what exceptions should be declared by a function when compiled to a JVM method.

+

Example:

+
Throws(IOException::class)
+fun readFile(name: String): String {...}
test / ItDoesSomeObfuscatedThing
+
+

ItDoesSomeObfuscatedThing

+class ItDoesSomeObfuscatedThing +

Check output of

+
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
+ + diff --git a/core/testdata/format/codeBlock.kt b/core/testdata/format/codeBlock.kt index e3fa27d2..633bf414 100644 --- a/core/testdata/format/codeBlock.kt +++ b/core/testdata/format/codeBlock.kt @@ -11,3 +11,12 @@ import kotlin.reflect.KClass * ``` */ class Throws + + +/** + * Check output of + * ``` brainfuck + * ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. + * ``` + */ +class ItDoesSomeObfuscatedThing \ No newline at end of file diff --git a/core/testdata/format/codeBlock.md b/core/testdata/format/codeBlock.md index 016ea9e8..55a054f6 100644 --- a/core/testdata/format/codeBlock.md +++ b/core/testdata/format/codeBlock.md @@ -13,7 +13,15 @@ Throws(IOException::class) fun readFile(name: String): String {...} ``` -### Constructors +[test](test/index) / [ItDoesSomeObfuscatedThing](test/-it-does-some-obfuscated-thing/index) -| [<init>](test/-throws/-init-) | `Throws()`
This annotation indicates what exceptions should be declared by a function when compiled to a JVM method. | +# ItDoesSomeObfuscatedThing + +`class ItDoesSomeObfuscatedThing` + +Check output of + +``` brainfuck +++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. +``` -- cgit