-
Notifications
You must be signed in to change notification settings - Fork 226
Feature/tag texts #1345
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
Feature/tag texts #1345
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1345 +/- ##
===========================================
- Coverage 86.72% 86.66% -0.06%
===========================================
Files 337 338 +1
Lines 84145 84269 +124
Branches 4769 3153 -1616
===========================================
+ Hits 72971 73032 +61
- Misses 11151 11237 +86
+ Partials 23 0 -23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
I would suggest to always consider tags to be a triple of strings [left, tag, right]
. If one does not need the fences, once can leave them empty. This would avoid a all the case analysis for Array and would also simplify types.
Is there a reason why we would not want that?
That would be a potential breaking change, which we aren't supposed to make in minor versions. So this is for backward compatibility, mainly with the I suppose the breaking up of the string could be moved to the |
I had not thought about the potential breaking change. Makes sense. |
This PR changes the handling of tags to make three separate
mtext
nodes: one for the left delimiter, one for the tag number, and one for the right delimiter.The
formatTag()
andformatRef()
functions now take either a string or a triple of strings to use for the tag format. If it is just a string, then parentheses, brackets, and braces are removed from the beginning and ending of the thing to make the triple, otherwise, the string is used as is (and only a singlemtext
will be created).The tests are updated to take these changes into account.