Use data- attributes to preserve macro configs
This commit is contained in:
+2
-6
@@ -52,13 +52,9 @@ export class HopDown {
|
||||
// Build macro tags if macros are provided
|
||||
this.macroMap = new Map();
|
||||
if (options.macros && options.macros.length > 0) {
|
||||
const { blockTag, selectorEntries, macroMap } = buildMacroTags(options.macros);
|
||||
const { blockTag, selectorTag, macroMap } = buildMacroTags(options.macros);
|
||||
this.macroMap = macroMap;
|
||||
tagMap = {
|
||||
...tagMap,
|
||||
...selectorEntries,
|
||||
};
|
||||
// Insert macro block tag — will be placed after fencedCode below
|
||||
tagMap['[data-macro]'] = selectorTag;
|
||||
tagMap['_macro'] = blockTag;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user