diff options
Diffstat (limited to 'js/lib/inlines.js')
-rw-r--r-- | js/lib/inlines.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/js/lib/inlines.js b/js/lib/inlines.js index 46e4644..8bd70c2 100644 --- a/js/lib/inlines.js +++ b/js/lib/inlines.js @@ -2,6 +2,8 @@ var Node = require('./node'); var common = require('./common'); +var normalizeReference = require('./normalize-reference'); + var normalizeURI = common.normalizeURI; var unescapeString = common.unescapeString; var fromCodePoint = require('./from-code-point.js'); @@ -92,14 +94,6 @@ var reLinkLabel = /^\[(?:[^\\\[\]]|\\[\[\]]){0,1000}\]/; // Matches a string of non-special characters. var reMain = /^[^\n`\[\]\\!<&*_]+/m; -// Normalize reference label: collapse internal whitespace -// to single space, remove leading/trailing whitespace, case fold. -var normalizeReference = function(s) { - return s.trim() - .replace(/\s+/, ' ') - .toUpperCase(); -}; - var text = function(s) { var node = new Node('Text'); node.literal = s; |