Community
    • Login

    function list: I made an XML for one liner HTML comments

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    1 Posts 1 Posters 222 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.
    • Stephan Romhart 0S
      Stephan Romhart 0
      last edited by

      I Just wanted to share the XML for HTML comments.

      Sometimes I have long static HTML files that need to be structured with one liner comments. Since I am german, I added german Umlaute like äöüÄÖÜ and ß.

      To enable HTML for the function list, you have to edit overrideMap.xml in
      C:\Program Files\Notepad++\functionList

      1. Add HTML as user defined language
      <association id="html.xml" userDefinedLangName="HTML" />
      
      1. Make new XML file, save it as html.xml and copy the following code in it. The copy the xml file in C:\Program Files\Notepad++\functionList
      <?xml version="1.0" encoding="UTF-8" ?>
      <NotepadPlus>
      	<functionList>
      		<parser displayName="HTML" id="html_comment" commentExpr="(?s:/\*.*?\*/)|(?m-s://.*?$)">
      			<function mainExpr="\x3C!-- [A-Za-z\xe4\xf6\xfc\xc4\xd6\xdc\xdf#' -_,.!=?]* --\x3E">
      				<functionName>
      					<nameExpr expr=" \K[A-Za-z\xe4\xf6\xfc\xc4\xd6\xdc\xdf#' -_,.!=?]* " />
      				</functionName>
      			</function>
      		</parser>
      	</functionList>
      </NotepadPlus>
      
      1 Reply Last reply Reply Quote 2
      • First post
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors