-
Notifications
You must be signed in to change notification settings - Fork 855
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
Refactor em strong to consolidate code and fix issue #792 #805
Refactor em strong to consolidate code and fix issue #792 #805
Conversation
Tests are still needed for the new, fixed case. |
Current tests are now passing, but will have to address coverage as well. |
PyYaml 5.1 wrecking Python 2 tests 😡 . |
That is annoying. I understand why PyYAML made the changes they did, but we were relying on the fact that the PyYAML and json libs both used the same API and PyYAML could parse JSON. We also avoided requiring PyYAML as a hard dependency as we used the json lib as a fallback. Now we need a more complicated implementation to account for the differences between the libs' APIs. |
Do you know why it is only failing on Python 2? |
I do not. The lowdown on the changes are here. I suppose we could simply disable the warning as an easy fix. We only use the YAML loader in the CLI so if there is a vulnerability there, the user has much worse problems that arbitrary code injected in a YAML config file. |
The PyYAML issue has been addressed in #806. Feel free to rebase your work on master now. |
Ugh, everything broke for some reason... Probably need to rebase maybe |
Tests appear to be broken due to the latest tox 3.8+. By forcing 3.7 tox, tests begin passing again. |
Maybe related to tox-dev/tox#1236. |
Let's see what tox does before we address this. If they fix it quickly in the next release, then we might not need to do anything. |
Yeah, I'm obviously in no hurry as I've been taking my time. The current work around was just to identify what I figured was the problem, it isn't meant to be the official solution unless we are desperate. |
… 3.7.0" This reverts commit 91873ae.
Okay, I finally got around to rebasing this. Obviously |
Look good. Just needs a note in the release notes. Feel free to added a new |
As we are removing many existing inline processors and replacing them with two new ones, I think we probably need to make mention of that in the release notes. For example, if an extension is removing all of the existing inline processors, the dev will need to do some work to make it compatible. The release notes needs to call this out. That's why I suggested |
Makes sense. I'll adjust within the next day or two. |
This refactors em strong logic into two processors: one for asterisks and one for underscores. All logic for the respective emphasis convention is consolidated, and a new pattern is added to handle
**strong*em***
and__strong_em___
respectively.