diff --git a/src/lib/core/rules.js b/src/lib/core/rules.js index 064756e16..504a9d4b3 100644 --- a/src/lib/core/rules.js +++ b/src/lib/core/rules.js @@ -1,8 +1,10 @@ export const HEADER_FLAG = ' _MD-HEADER_ '; +export const IMAGE_FLAG = ['_MD-HEADER_', true]; +const IMAGE_FLAG_STR = `${IMAGE_FLAG[0]}="${IMAGE_FLAG[1]}" `; -export function headRule(tocHeadRule) { +export function headRule(defaultTocHeadRule) { return function (tokens, index) { - let code = tocHeadRule(tokens, index); + let code = defaultTocHeadRule(tokens, index); var label = tokens[index + 1]; if (label.type === 'inline') { return code.replace('