summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-09-22 22:36:35 +0200
committerSamy Pessé <samypesse@gmail.com>2015-09-22 22:36:35 +0200
commit62d0eb606eddfcb9a87b1447dd2e7bf8b389987f (patch)
treeb67616abce2b953ef6528e5fd67cebc79bab4577
parent0e9beeae14682b8124db3df580a21e6a76cc0805 (diff)
downloadgitbook-62d0eb606eddfcb9a87b1447dd2e7bf8b389987f.zip
gitbook-62d0eb606eddfcb9a87b1447dd2e7bf8b389987f.tar.gz
gitbook-62d0eb606eddfcb9a87b1447dd2e7bf8b389987f.tar.bz2
Add test for inline code block with html tags
-rw-r--r--test/books/highlight/README.md3
-rw-r--r--test/codehighlighting.js9
2 files changed, 11 insertions, 1 deletions
diff --git a/test/books/highlight/README.md b/test/books/highlight/README.md
index 417fabc..f47ac83 100644
--- a/test/books/highlight/README.md
+++ b/test/books/highlight/README.md
@@ -12,4 +12,5 @@ Block with a language
test 2
```
-Inline code: `test 3` \ No newline at end of file
+Inline code: `test 3`
+Inline code with html: `<test>` \ No newline at end of file
diff --git a/test/codehighlighting.js b/test/codehighlighting.js
index d79fc85..5b3902b 100644
--- a/test/codehighlighting.js
+++ b/test/codehighlighting.js
@@ -52,5 +52,14 @@ describe("Code Highlighting", function () {
}
});
});
+
+ it("should correctly replace highlighting for inline code with html tags", function() {
+ PAGE.should.be.html({
+ "code": {
+ index: 2,
+ text: "code_<test>_code"
+ }
+ });
+ });
});