summaryrefslogtreecommitdiffstats
path: root/lib/output/modifiers/annotateText.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-06-29 10:31:06 +0200
committerSamy Pessé <samypesse@gmail.com>2016-06-29 10:31:06 +0200
commitc9c2dde2b63505177265c66b1a6c4dd358415416 (patch)
tree444b6a539c93f677c6f8ee5eac67dca8de7cdab8 /lib/output/modifiers/annotateText.js
parentd9a1d387c7a61aa18cdb9b2916bc761e0f902804 (diff)
downloadgitbook-c9c2dde2b63505177265c66b1a6c4dd358415416.zip
gitbook-c9c2dde2b63505177265c66b1a6c4dd358415416.tar.gz
gitbook-c9c2dde2b63505177265c66b1a6c4dd358415416.tar.bz2
Add method "isFile" and "isReadme" in SummaryArticle
Diffstat (limited to 'lib/output/modifiers/annotateText.js')
-rw-r--r--lib/output/modifiers/annotateText.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/output/modifiers/annotateText.js b/lib/output/modifiers/annotateText.js
index 2b4b439..490c228 100644
--- a/lib/output/modifiers/annotateText.js
+++ b/lib/output/modifiers/annotateText.js
@@ -59,19 +59,18 @@ function replaceText($, el, search, replace, text_only ) {
}
/**
- Annotate text using a list of GlossaryEntry
-
- @param {List<GlossaryEntry>}
- @param {String} glossaryFilePath
- @param {HTMLDom} $
-*/
+ * Annotate text using a list of GlossaryEntry
+ *
+ * @param {List<GlossaryEntry>}
+ * @param {String} glossaryFilePath
+ * @param {HTMLDom} $
+ */
function annotateText(entries, glossaryFilePath, $) {
entries.forEach(function(entry) {
- var entryId = entry.getID();
- var name = entry.getName();
+ var entryId = entry.getID();
+ var name = entry.getName();
var description = entry.getDescription();
-
- var searchRegex = new RegExp( '\\b(' + pregQuote(name.toLowerCase()) + ')\\b' , 'gi' );
+ var searchRegex = new RegExp( '\\b(' + pregQuote(name.toLowerCase()) + ')\\b' , 'gi' );
$('*').each(function() {
var $this = $(this);