bdewey/org-ruby — pull request #20 by Neil-Smithline (2012-02-26 16:09:49+00:00)
Title: Support for <hr> for HTML

Hey,

I am interested in beefing up Github's support for README.org support.

My understanding is that this uses the org-ruby gem. Is that correct?

I have assumed that it uses the HTML conversion of org-ruby and not the textile conversion. Is that correct?

Based on the above assumptions, I have started looking at the org-ruby support for HTML. I'm struggling a bit as I've even seen Ruby code before last night, but I'm learning.

I added support for converting 5 or more consecutive '-' alone on a line with nothing else but whitespace into an HTML

. tag. It is a one line. I have not made any change to the textile support as I made the change in html_output_buffer.rb.

I thought it may have been better to put it into line.rb by creating a :horizontal_rule paragraph type but I couldn't figure out how to do that.

I'm interested in doing more. Particularly, I would like #+HTML: and #+BEGIN/END_HTML to work as well as having "@" be translated to "" in the output.

My thought on the @< fix is that I need to change the gsub in html_output_buffer.rb that converts < to < to not do that if it is preceded by an @. Then I need to conjure up a magical regexp for the gsub that converts > to > such that it won't do it if this is the first > following a @<.

Does my change seem reasonable? Do my future plans seem reasonable? Are you good with me doing this? Should I have implemented something differently?

Thanks,

Neil

PS: I haven't quite figured out how line.rb works as I really don't know Ruby, but it looks like a very nice piece of code.