Don't produce invalid XML with multi-line commenting style
authorKonstantin Kharlamov <Hi-Angel@yandex.ru>
Tue, 25 Jun 2024 09:26:12 +0000 (12:26 +0300)
committerStefan Kangas <stefankangas@gmail.com>
Thu, 25 Jul 2024 08:48:03 +0000 (10:48 +0200)
commit9eea6be5abffa91d21ea299158d5a2cd6cfb5089
tree8a16e1544f2336417177bc172f156b6e9fa50a06
parentb97786d9f6ec242501e8db40bb4da08f0f64d04d
Don't produce invalid XML with multi-line commenting style

Both XML and HTML forbid double hyphens inside comments.  However,
nxml-mode was using a `!--' as a comment padding if `comment-style'
was set to any of the styles that supposed to add padding.  This infix
was auto-derived due to `comment-continue' being nil.  To fix that set
`comment-continue' explicitly.  It's unclear what padding should be
used, but from looking at other editors it seems they don't typically
add padding in XML, so let's be simple for now and just set
`comment-continue' to empty string.

* lisp/nxml/nxml-mode.el (nxml-mode): Make 'comment-continue' a
buffer-local variable set to the empty string.  (Bug#71772)
lisp/nxml/nxml-mode.el