10000 feat: allow `class` attributes for `div` and `p` · pypa/readme_renderer@9277f4a · GitHub
[go: up one dir, main page]

Skip to content

Commit 9277f4a

Browse files
committed
feat: allow class attributes for div and p
docutils' admonitions renders the blocks using `class` attributes, which can then be styled via CSS. Allow `class` attributes to pass through the cleaner. Signed-off-by: Mike Fiedler <miketheman@gmail.com>
1 parent e689c2d commit 9277f4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readme_renderer/clean.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@
4747
"span": ["class"],
4848
"th": ["align"],
4949
"td": ["align"],
50-
"div": ["align"],
50+
"div": ["align", "class"],
5151
"h1": ["align"],
5252
"h2": ["align"],
5353
"h3": ["align"],
5454
"h4": ["align"],
5555
"h5": ["align"],
5656
"h6": ["align"],
5757
"code": ["class"],
58-
"p": ["align"],
58+
"p": ["align", "class"],
5959
"ol": ["start"],
6060
"input": ["type", "checked", "disabled"],
6161
}

0 commit comments

Comments
 (0)
0