|
@ -19,6 +19,10 @@ |
|
|
|
|
|
|
|
|
var RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/; |
|
|
var RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/; |
|
|
|
|
|
|
|
|
|
|
|
// Workaround for phantomjs - need regex without /g flag,
|
|
|
|
|
|
// or root check will fail every second time
|
|
|
|
|
|
var SCOPED_ABBR_TEST_RE = /\((c|tm|r|p)\)/i; |
|
|
|
|
|
|
|
|
var SCOPED_ABBR_RE = /\((c|tm|r|p)\)/ig; |
|
|
var SCOPED_ABBR_RE = /\((c|tm|r|p)\)/ig; |
|
|
var SCOPED_ABBR = { |
|
|
var SCOPED_ABBR = { |
|
|
'c': '©', |
|
|
'c': '©', |
|
@ -75,7 +79,7 @@ module.exports = function replace(state) { |
|
|
|
|
|
|
|
|
if (state.tokens[blkIdx].type !== 'inline') { continue; } |
|
|
if (state.tokens[blkIdx].type !== 'inline') { continue; } |
|
|
|
|
|
|
|
|
if (SCOPED_ABBR_RE.test(state.tokens[blkIdx].content)) { |
|
|
if (SCOPED_ABBR_TEST_RE.test(state.tokens[blkIdx].content)) { |
|
|
replace_scoped(state.tokens[blkIdx].children); |
|
|
replace_scoped(state.tokens[blkIdx].children); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|