Loading ...
Sorry, an error occurred while loading the content.

comment-region doesn't handle comments

Expand Messages
  • Rohan Lloyd
    ... uncomment-region correctly turns this back into the original XML, ... I m using: Emacs: 21.3.50.1 nxml-mode: 20040726 -- Rohan Lloyd
    Message 1 of 1 , Aug 4, 2004
    • 0 Attachment
      Given a piece of XML like:

      > <foo>
      > <!-- this is a commment -->
      > <bar a="1234" b="42"/>
      > </foo>

      comment-region turns it into:

      > <!-- <foo> -->
      > <!-- <\!-- this is a commment -\-> -->
      > <!-- <bar a="1234" b="42"/> -->
      > <!-- </foo> -->

      uncomment-region correctly turns this back into the original XML,
      however the commented out version is not valid:

      > $ xmllint --noout /tmp/foo.xml
      > /tmp/foo.xml:10: parser error : Comment must not contain '--'
      > (double-hyphen)
      > <!-- <\!-- this is a commment -\-> -->



      I'm using:

      Emacs: 21.3.50.1
      nxml-mode: 20040726

      --
      Rohan Lloyd
    Your message has been successfully submitted and would be delivered to recipients shortly.