Skip to content

Commit

Permalink
Fix problem with not closing empty tags in HTML serialization (mathja…
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Apr 23, 2021
1 parent 59212ff commit fa0265a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ts/adaptors/lite/Parser.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/*************************************************************
*
* Copyright (c) 2018 The MathJax Consortium
Expand Down Expand Up @@ -358,7 +359,7 @@ export class LiteParser implements MinDOMParser<LiteDocument> {
const content = this.serializeInner(adaptor, node, xml);
const html =
'<' + tag + (attributes ? ' ' + attributes : '')
+ (content && !SELF_CLOSING[tag] ? `>${content}</${tag}>` : xml ? '/>' : '>');
+ ((!xml || content) && !SELF_CLOSING[tag] ? `>${content}</${tag}>` : xml ? '/>' : '>');
return html;
}

Expand Down

0 comments on commit fa0265a

Please sign in to comment.