mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
HTML writer: insert data- in front of unsupported attributes.
Thus, a span with attribute 'foo' gets written to HTML5 with 'data-foo', so it is valid HTML5. HTML4 is not affected. This will allow us to use custom attributes in pandoc without producing invalid HTML.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
Custom attributes should automatically have data- added
|
||||
in HTML5:
|
||||
```
|
||||
% pandoc -t html5
|
||||
[hello]{foo="bar"}
|
||||
^D
|
||||
<span data-foo="bar">hello</span>
|
||||
```
|
||||
|
||||
but not in HTML4:
|
||||
```
|
||||
% pandoc -t html4
|
||||
[hello]{foo="bar"}
|
||||
^D
|
||||
<span foo="bar">hello</span>
|
||||
```
|
||||
Reference in New Issue
Block a user