From 7a7e1b2b70d7f22ad7ca2c6aea56055804a1cdb2 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Tue, 29 Mar 2022 17:50:55 +0200 Subject: RST reader: wrap math in Span to preserve attributes (#7998) Math elements with a name, classes, or other fields are wrapped in a `Span` with these attributes. --- test/rst-reader.native | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test/rst-reader.native') diff --git a/test/rst-reader.native b/test/rst-reader.native index f5c60cd4f..51bb940bf 100644 --- a/test/rst-reader.native +++ b/test/rst-reader.native @@ -1556,10 +1556,13 @@ Pandoc , Math DisplayMath "\\alpha = \\beta" ] , Para - [ Math - DisplayMath - "\\begin{aligned}\nE &= mc^2\\\\\nF &= \\pi E\n\\end{aligned}" - , Math DisplayMath "F &= \\gamma \\alpha^2" + [ Span + ( "" , [] , [ ( "label" , "hithere" ) , ( "nowrap" , "" ) ] ) + [ Math + DisplayMath + "\\begin{aligned}\nE &= mc^2\\\\\nF &= \\pi E\n\\end{aligned}" + , Math DisplayMath "F &= \\gamma \\alpha^2" + ] ] , Para [ Str "All" , Space , Str "done." ] , Header 1 ( "default-role" , [] , [] ) [ Str "Default-Role" ] -- cgit v1.2.3