threedaymonk / htmlbeautifier

A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates.
MIT License
325 stars 59 forks source link

Version 1.2.0 - Add support for Liquid syntax #34

Closed forsbergplustwo closed 8 years ago

forsbergplustwo commented 8 years ago

Excellent project, many thanks for this!

This pull request adds support for the Liquid (https://github.com/Shopify/liquid) syntax. It is very close to erb with only a slightly different opening/closing tag regex and indent/outdent keywords.

I got errors running tests on the master branch of the original project so instead I've tested on numerous ruby/liquid/html files, as well as the code in the document_spec.rb file.. and results pass :+1:

I know this may not be something you want to add in the core project, but I thought I'd send upstream just in case ;)

forsbergplustwo commented 8 years ago

I'll review the Rubocop build errors (style violations) in the morning and provide a new pull request.