markdown: allow cell alignment in tables
Mistletoe supports Github's tables extension, including cell alignment (see [1]). However, the sanitizer currently does not allow the align attributes on the table cells, so the alignment never renders. Add the align attribute to the list of allowed attributes for td and th element, so that cell alignment works as expected. [1] https://github.github.com/gfm/#example-199
This commit is contained in:
parent
b663dbe7cf
commit
7fc2c6ca49
|
@ -180,6 +180,8 @@ _sanitizer_attrs = {
|
|||
"h4": ["id"],
|
||||
"h5": ["id"],
|
||||
"h6": ["id"],
|
||||
"th": ["align"],
|
||||
"td": ["align"],
|
||||
"img": _img_filter,
|
||||
"input": _input_filter,
|
||||
"div": _div_filter,
|
||||
|
|
Loading…
Reference in New Issue