bdewey/org-ruby — pull request #38 by vonavi (2012-12-20 15:04:44+00:00)
Title: New pretty indentation of HTML outputs

Hi guys!

At last, I've finished code which simplifies the indentation and output accumulation of Org files. All examples passed correctly (HTML and Textile examples, code syntax highlighting), and, on my opinion, look pretty now. The code relies on idea to assign to paragraphs their major modes, i.e., list items form a lists, table heading, rows, and separators form a table and so on. This decision allowed me to handle open and close tags carefully, when paragraph can open its major mode, but can't close its major mode. The code includes one method only for managing indentation and that for managing output accumulation. In common, it made the code clearly, which in turn handles all examples correctly.

One obvious difference: blank lines don't get accumulated any more, because I decided to restore the default Emacs Org mode behavior when two blank lines close all modes.

Best regards,
Vladimir.