middleman / middleman-syntax

Code syntax highlighting plugin via Rouge for Middleman
https://middlemanapp.com
MIT License
179 stars 57 forks source link

All tests are passing #46

Closed gabebw closed 9 years ago

gabebw commented 9 years ago

The tests were failing before for a few reasons:

Arcovion commented 9 years ago

Thank you, these were long standing bugs. I think the docs need to be updated for the code helper re: -=, do you know if the erb example still works or if it needs adjusting <% %><%= %>?

gabebw commented 9 years ago

Oh, weird. I thought that - vs = in Haml was a mistake, but it looks like the code helper is supposed to work without = in Haml/erb, per the docs.

It does work without <%=, just <%, in ERb - what if I change it and middleman-syntax just requires = everywhere, in Haml and erb?

(I have not taken a very hard look at the middleman-syntax/rouge/haml pipeline, so I'm not sure exactly where the bug is in Haml.)

Arcovion commented 9 years ago

Yea it's strange, Padrino helpers are now using = in Haml and <% %> in ERb, so this actually matches that behaviour... it's inconsistent but they say it's not easy to fix. I think using = for the helper is best in Haml/Slim, but for ERb we probably want to match the other helpers.

https://github.com/padrino/padrino-framework/issues/1839 cc: @tdreyno

gabebw commented 9 years ago

Thanks for the pointer to the issue! I've updated the documentation to reflect Haml/erb differences, and also updated the HTML structure in the docs because Rouge generates <pre><code> now, not just <div><pre>.

Arcovion commented 9 years ago

Nice, looks good to me!

tdreyno commented 9 years ago

Thanks @gabebw

gabebw commented 9 years ago

You're welcome! It's a great project.