Using ignore_list to ignore script and kbd #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is no need to have specialized logic to ignore the script and kbd tags in the caps filter, it can be handled by the process_ignores function.
I have therefore added both script and kbd as defaults to be ignored in the process_ignores function, and removed the logic from the caps filter. Not only does this simplify the logic of caps, but on a higher level, it is a good idea to make sure that typogrify does not ever touch things like the script.
I have also added more tests, and moved some tests around. I am pleased to say that everything passes.
@chrisdrackett This is a great first step in simplifying the code, but while all the tests pass, you need to convince yourself that this is the way to go. I am available for discussions. The next step (which I will do if you are okay with this) is to use the smartypants tokenizer logic to skip html tags. This will simplify regex and logic of things like the amp filter.