Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
HTML Line Tree turns any text in Line Tree format into a pretty HTML document
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
MIT-LICENSE
README
README.md
gem-public_cert.pem
hlt.gemspec

README.md

Introducing the HTML Line Tree (HLT) gem

The HTML Line Tree (HLT) gem generates HTML from text in Line-Tree format. e.g.

require 'hlt'

s =<<S
html {lang: 'en'}
  head
    title
    meta {charset: 'utf-8'}
    # link {rel: 'stylesheet', type: 'text/css', href: 'foo', media: 'screen'}
    # script {type: 'text/javascript', src: '123'}

  body
    script
[
// javascript goes here
]

S

Hlt.new(s).to_html

output:

puts Hlt.new(s).to_html


<?xml version='1.0' encoding='UTF-8'?>
<html lang='en'>
  <head>
    <title></title>
    <meta charset='utf-8'></meta>
  </head>
  <body>
    <script>
    // javascript goes here

</script>
  </body>
</html>

Resources

Something went wrong with that request. Please try again.