-
Notifications
You must be signed in to change notification settings - Fork 265
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
[HTML] Introducing tag_indents & tag_styles #1124
Conversation
edeb0b3
to
ffde695
Compare
@gmischler & @andersonhc: could you please review this PR? It introduces some two new "structuring" parameters to |
ce824fc
to
400ed4f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1124 +/- ##
==========================================
- Coverage 93.42% 93.34% -0.09%
==========================================
Files 30 30
Lines 9130 9179 +49
Branches 2071 2089 +18
==========================================
+ Hits 8530 8568 +38
- Misses 371 374 +3
- Partials 229 237 +8 ☔ View full report in Codecov by Sentry. |
cd96422
to
ff8165d
Compare
35812d1
to
9b5836b
Compare
9b5836b
to
790093a
Compare
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.
Looks ok, adding flexibility without making them much more complicated.
Thank you for the feedback! Merging this now. |
This is a follow-up of #1066 that also provides the feature requested in #1074
Checklist:
The GitHub pipeline is OK (green), meaning that both
pylint
(static code analyzer) andblack
(code formatter) are happy with the changes of this PR.A unit test is covering the code added / modified by this PR
This PR is ready to be merged
In case of a new feature, docstrings have been added, with also some documentation in the
docs/
folderA mention of the change is present in
CHANGELOG.md
By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.
Documentation added to docs/HTML.md:
Styling HTML tags globally
The style of several HTML tags (
<a>
,<blockquote>
,<code>
,<pre>
,<li>
,<h1>
,<h2>
,<h3>
...) can be set globally, for the whole HTML document, by passingtag_styles
toFPDF.write_html()
:Similarly, the indentation of several HTML tags (
<blockquote>
,<dd>
,<li>
) can be set globally, for the whole HTML document, by passingtag_indents
toFPDF.write_html()
: