diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-03-23 11:00:50 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-03-23 11:00:50 +0100 |
commit | 63ee94ff89d10e56d82079183c494f8129b92eae (patch) | |
tree | a25891df1d80a7e819e0892459cd6bb3300deaa1 /lib | |
parent | 7d9dc08a382d2fb82074aa0ca7544c8929261a0e (diff) | |
download | gitbook-63ee94ff89d10e56d82079183c494f8129b92eae.zip gitbook-63ee94ff89d10e56d82079183c494f8129b92eae.tar.gz gitbook-63ee94ff89d10e56d82079183c494f8129b92eae.tar.bz2 |
Ignore codeblocks when replacing glossary terms
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils/page.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/page.js b/lib/utils/page.js index 3c7d0b0..499c9a8 100644 --- a/lib/utils/page.js +++ b/lib/utils/page.js @@ -242,6 +242,9 @@ function normalizeHtml(src, options) { var includedInFiles = false; $("*").each(function() { + // Ignore codeblocks + if (_.contains(["code", "pre"], this.name.toLowerCase())) return; + replaceText($, this, r, function(match) { // Add to files index in glossary if (!includedInFiles) { |