New pretty indentation of HTML outputs #38

Closed
wants to merge 28 commits into
from

Projects

None yet

2 participants

@vonavi
Collaborator
vonavi commented Dec 20, 2012

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.

@wallyqs
Collaborator
wallyqs commented Dec 21, 2012

Hey Vladimir, thanks for sharing you work again. I think you really nailed it by refactoring into major modes, this looks really good and it makes things more clear. Thanks for handling the code syntax highlight test too!
Awesome pull request.

@vonavi
Collaborator
vonavi commented Jan 11, 2013

Hey, guys!
I completed the work on indentation, when I refactored methods for accumulating output and the maintenance of mode stack. A lot of code was modified, so now I satisfied with the results, in particular, the HTML output. All examples were updated accordingly. I'm looking forward to answer if you accept the pull request or not.
Best regards,
Vladimir.

@wallyqs
Collaborator
wallyqs commented Jan 12, 2013

Hey Vladimir,

Thanks for your contribution. I will be looking into pulling this over the weekend.
Cheers.

@wallyqs wallyqs closed this in 7cc4bfc Jan 14, 2013
@wallyqs
Collaborator
wallyqs commented Jan 14, 2013

Merged. I like the direction you are taking with refactoring this gem. This also fixed some bugs that the gem had regarding lists, so thanks again for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment