Skip to content

Commit

Permalink
Autoopened text nodes can autoclose, but not necessarily others
Browse files Browse the repository at this point in the history
  • Loading branch information
brucemiller committed May 29, 2024
1 parent 07639dd commit 048674d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/LaTeXML/Core/Document.pm
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ sub canAutoClose {
|| (($t == XML_ELEMENT_NODE) # otherwise must be element
&& !$node->getAttribute('_noautoclose') # without _noautoclose
&& ($node->getAttribute('_autoclose') # and either with _autoclose
|| $node->getAttribute('_autoopened') # or was autoopened
# OR it has autoClose set on tag properties
|| (($props = $STATE->lookupMapping('TAG_PROPERTIES', getNodeQName($self, $node)))
&& $$props{autoClose})));
Expand Down Expand Up @@ -772,7 +771,7 @@ sub openText {
$n = $n->parentNode; }
closeToNode($self, $closeto) if $closeto ne $node; # Move to best starting point for this text.
openElement($self, $elementname, font => $font,
_fontswitch => 1, _autoopened => 1)
_fontswitch => 1, _autoopened => 1, _autoclose => 1)
if $bestdiff > 0; # Open if needed.
}
# Finally, insert the darned text.
Expand Down

0 comments on commit 048674d

Please sign in to comment.