From d441e656db576f266c4866e65ff9e4705d376381 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 25 Jul 2017 13:13:24 +0200 Subject: 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. --- test/command/custom-attributes.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/command/custom-attributes.html (limited to 'test/command/custom-attributes.html') diff --git a/test/command/custom-attributes.html b/test/command/custom-attributes.html new file mode 100644 index 000000000..67dccc1b8 --- /dev/null +++ b/test/command/custom-attributes.html @@ -0,0 +1,16 @@ +Custom attributes should automatically have data- added +in HTML5: +``` +% pandoc -t html5 +[hello]{foo="bar"} +^D +hello +``` + +but not in HTML4: +``` +% pandoc -t html4 +[hello]{foo="bar"} +^D +hello +``` -- cgit v1.2.3