Open Hypercubed opened 4 years ago
Looking again at this code was the intent to do parsedAttr = parseAttr(eaten.lang, eaten.lang.indexOf(' '));
instead of looking invalue
?
@arobase-che I can submit a PR if we are ready to remove this legacy code... or maybe put it behind a flag?
Sorry I didn't take time to understand the problem.
PR are welcome.
You are talking about deleting the legacy code of tokenizeFencedCode
?
Happy new year!
Do you while we can get rid of this code: https://github.com/arobase-che/remark-attr/blob/master/src/index.js#L194
If we still need it we might need to improve the algorithm here. I've found several cases where the attrs are being picked up when they shouldn't... for example:
will apply the
info="string"
attribute to the outer code block.My workaround, for now, is to add attr markup to prevent remark-attr from diving into the value: