XML lexer for the Makup syntax highlighter.
| lib | Fix unicode character ranges for names | |
| test | Fix unicode character ranges for names | |
| .formatter.exs | Initial commit - working lexer | |
| .gitignore | Initial commit - working lexer | |
| LICENSE | Initial commit - working lexer | |
| mix.exs | Add ExDoc, expand metadata, add example to README | |
| mix.lock | Add ExDoc, expand metadata, add example to README | |
| README.md | Add ExDoc, expand metadata, add example to README | |
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>