From 83a42d113f86b4756619e80aff12c2db2069f5d2 Mon Sep 17 00:00:00 2001 From: Chas Emerick Date: Wed, 12 Jan 2022 13:56:23 -0500 Subject: [PATCH] implement an escape hatch for emitting attributes with non-standard names (#295) --- CHANGES.md | 4 +++- docs/manual-wiki/jsx.wiki | 21 +++++++++++++++++++++ docs/manual-wiki/ppx.wiki | 21 +++++++++++++++++++++ jsx/dune | 2 +- jsx/tyxml_jsx.ml | 36 ++++++++++++++++++++---------------- syntax/attributes.ml | 20 ++++++++++++++------ test/test_jsx.re | 10 ++++++++++ test/test_ppx.ml | 6 ++++++ 8 files changed, 96 insertions(+), 24 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b77ca3fc1..31f3b5d82 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,9 @@ * Add support for `dialog` element and `onclose` attribute (#301 by Julien Sagot) - +* Add an escape hatch for emitting attributes with non-standard names + in jsx or ppx code (a leading `_` character on attribute name) + (#295 Chas @cemerick Emerick) * Add support for `type` attribute on `