Closed tlylt closed 2 years ago
Hi 🙂 I think this still holds, does it not?
any token.block == true
This part of test: https://github.com/arve0/markdown-it-attrs/blob/master/patterns.js#L26
with {}-curlies in end of token.info
Test part: https://github.com/arve0/markdown-it-attrs/blob/master/patterns.js#L27
The pattern name is fenced code blocks, but it will apply to any token matching the test.
Hi 🙂 I think this still holds, does it not?
any token.block == true
This part of test:
master
/patterns.js#L26with {}-curlies in end of token.info
Test part:
master
/patterns.js#L27The pattern name is fenced code blocks, but it will apply to any token matching the test.
Ah ok, sorry I think I misunderstood it to mean only for token.block == true with {}-curlies in end of token.info
, which is not the case anymore (as long as they match one of the patterns described). I think I was confused because the link below was referencing the file markdown-it-attrs/index.js
in an old commit. So, I scrolled up and saw the version of the index.js
without patterns and transforms.
Anyways thanks for the clarification!
Hi,
While looking through the code to understand how it does the parsing, I realized that the description in the Custom-blocks seems to be outdated. Quoting it below for reference:
In particular, I think it is no longer the case that
markdown-it-attrs will add attributes to any token.block == true with {}-curlies in end of token.info.
. Now it seems to be more complex than what's described here because of the rewrite with patterns and transforms.Pointing it out in case there's a need to update it. Thanks!