-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
👌 IMPROVE: Make Token.attrs
a List[Tuple[str, Any]]
#102
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #102 +/- ##
==========================================
+ Coverage 96.38% 96.50% +0.12%
==========================================
Files 72 72
Lines 3205 3202 -3
==========================================
+ Hits 3089 3090 +1
+ Misses 116 112 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
These changes do not break compatibility with |
executablebooks/mdit-py-plugins#6 will fix |
if i < 0: | ||
tmpAttrs.append(["class", options.langPrefix + langName]) | ||
else: | ||
tmpAttrs[i][1] += " " + options.langPrefix + langName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line actually seems to have a bug that we're fixing by using the immutable tuple 😄 Mutating tmpAttrs[i]
here will also mutate token.attrs[i]
because tmpAttrs
is a copy, not a deep copy, of token.attrs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the fix in JS markdown-it markdown-it/markdown-it@c9949dd
If we don't end up merging this PR, we should do the same change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix is now in merged in master
of markdown-it-py btw
In fact, if we want to make
A Python 3.6 |
Superseded by #144 |
No description provided.