From 63ee94ff89d10e56d82079183c494f8129b92eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Mon, 23 Mar 2015 11:00:50 +0100 Subject: [PATCH] Ignore codeblocks when replacing glossary terms --- lib/utils/page.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/utils/page.js b/lib/utils/page.js index 3c7d0b0bc..499c9a8ee 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) {