1
0
Fork
You've already forked makeup_xml
0
XML lexer for the Makup syntax highlighter.
  • Elixir 100%
Find a file
2025年03月13日 01:10:42 +01:00
lib Fix unicode character ranges for names 2025年03月13日 01:03:12 +01:00
test Fix unicode character ranges for names 2025年03月13日 01:03:12 +01:00
.formatter.exs Initial commit - working lexer 2025年03月13日 00:07:50 +01:00
.gitignore Initial commit - working lexer 2025年03月13日 00:07:50 +01:00
LICENSE Initial commit - working lexer 2025年03月13日 00:07:50 +01:00
mix.exs Add ExDoc, expand metadata, add example to README 2025年03月13日 01:10:42 +01:00
mix.lock Add ExDoc, expand metadata, add example to README 2025年03月13日 01:10:42 +01:00
README.md Add ExDoc, expand metadata, add example to README 2025年03月13日 01:10:42 +01:00

MakeupXml

A Makeup lexer for XML.

This lexer is not fully comprehensive, but should be able to process the vast majority of XML documents with good results. It matches opening and closing tags as delimiters for nice highlighting.

Installation

Add makeup_xml to your dependencies in mix.exs:

def deps do
 [
 {:makeup_xml, "~> 0.1.0"}
 ]
end

The lexer is automatically registered to Makeup for the XML language and .xml file extension.

Example

When processed using ExDoc the following serves as an example of highlighting with this lexer. Run mix docs to generate the documentation or see the result on HexDocs.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE note SYSTEM "Note.dtd">
<?php echo "hi"; ?>
<note>
 <to>Joni</to>
 <from>Jani</from>
 <heading>Reminder</heading>
 <body>Don't forget me this weekend!</body>
 <!-- This is a comment -->
 <footer lang="en-US" data-info="signature">Best regards</footer>
</note>