staudt / MML

A minimalistic replacement for XML inspired by Jade

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MML

A minimalistic replacement for XML inspired by Jade.

It looks like this:

!docType(html)
html(lang='en-US')
  head
    title Page Title
    script(type="text/javascript") """
      if (foo) bar(1+3)
    """
    # ignore me
  body
    h1 Hello, I'm a title
    p '''Hey
       this is a multi line text'''

Which translates to:

<!docType html />
<html lang='en-US'>
  <head>
    <title>Page Title</title>
    <script type="text/javascript">
      if (foo) bar(1+3)
    </script>
    <!-- ignore me -->
  </head>
  <body>
    <h1>Hello, I'm a title</h1>
    <p>Hey
     this is a multi line text</p>
  </body>
</html>
  

It currently has a very basic implementation, just to show how it works. I'm curious to see if there is any interest in this format so that I can invest more time in a proper implementation. If you like it, let me know!

About

A minimalistic replacement for XML inspired by Jade

License:MIT License


Languages

Language:Python 100.0%