fix section number plugin to handle html title with attribut #1385
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.
Hello,
I propose this fix to support title numbering of html title tag containing attributs. Actually there is weak parsing which does not handle this case, see the following section_number/section_number.py#L12. I have replaced the current parsing with a call to beautifulsoup parser and some logic to number titles and subtitles. As a result, the code is more compact, readable and solves this problem.
Sorry I don't have the time to incorporate this fix in the new plugin system, because that would mean writing a plugin via the new path, that's why I propose the fix on this repository. You are free to accept it.