Community
    • Login

    CDATA is not properly rendered in html files

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    cdatajavascripthtml
    2 Posts 2 Posters 2.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Carl in 't VeldC
      Carl in 't Veld
      last edited by Carl in 't Veld

      <script>
      var x= ‘<Content><![CDATA[This is a first paragraph!<DIV>&nbsp;</DIV>And this is a second paragraph.]]></Content>’;
      </script>

      is not properly rendered in NotePad++ using html-styling.
      Why is that? Can I do something? Is there another html-plugin that will work correctly?

      One should expect one of the following:

      1. from opening apostrophe to closing apostrophe rendered as a string (grey by default)
      2. the phrase ‘<Content> rendered as a string and <![CDATA[ to ]]> rendered as CDATA (orange by default) and the phrase </Content>’ rendered as string.

      But now the CDATA section stops at &nbsp;. Starting from </DIV> the parser sees the remaing content as html i.e. it is rendered in blue and bold black.

      This creates lots of confusing while editing the html document.

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Carl in 't Veld
        last edited by

        Hello @Carl-in-'t-Veld,

        AFAIK this how the current lexer is working.
        Don’t know of any other html lexer yet.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors