Support tri-backquote style code block and fix ordered list indent
Implement https://github.com/Alir3z4/html2text/issues/386
testcase: test/backquote_code_style
Fix ordered list indent
<ol start="1">
<li>
<span>now with numbers</span>
</li>
<li>
<span>the prisoner</span>
</li>
<ol start="1">
<li>
<span>not an <i>italic number</i></span>
</li>
<li>
<span>a <b>bold human</b> being</span>
</li>
</ol>
<li>
<span>end</span>
</li>
</ol>
now it will be correctly converted into
- now with numbers
- the prisoner
- not an italic number
- a bold human being
- end
testcase : test/mixed_nested_lists
And, regarding the CLI parameter names and variable names in tri-backquote style, I didn't have a good name, so I used backquote_code_style. What do you think?
The implementation still has room for optimization, and discussion is welcome.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.42%. Comparing base (
2723f84) to head (5ea5c32). Report is 1 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #431 +/- ##
==========================================
+ Coverage 97.36% 97.42% +0.06%
==========================================
Files 11 11
Lines 1137 1164 +27
==========================================
+ Hits 1107 1134 +27
Misses 30 30
| Flag | Coverage Δ | |
|---|---|---|
| unittests-3.10 | 97.42% <100.00%> (+0.06%) |
:arrow_up: |
| unittests-3.11 | 97.42% <100.00%> (+0.06%) |
:arrow_up: |
| unittests-3.12 | 97.42% <100.00%> (+0.06%) |
:arrow_up: |
| unittests-3.13 | 97.42% <100.00%> (+0.06%) |
:arrow_up: |
| unittests-3.9 | 97.42% <100.00%> (+0.06%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Hello author, this function is very practical, I used today, but there is no formal package, I hope to merge and release soon