Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to honor line breaks #119

Closed
mojavelinux opened this issue Jan 25, 2013 · 2 comments
Closed

Add option to honor line breaks #119

mojavelinux opened this issue Jan 25, 2013 · 2 comments
Assignees
Milestone

Comments

@mojavelinux
Copy link
Member

AsciiDoc requires a plus sign offset by a space at the end of a line to create a hard break (in HTML, a <br>).

Example:

Roses are red +
Violets are blue

We should add a hardbreaks attribute that would tell Asciidoctor to break wrapped lines without having to append the plus character. This feature aligns with an extension of GFM. We could lobby to have this included in AsciiDoc as well.

Example:

Roses are red
Violets are blue

This would apply wherever regular paragraph text is used (probably just in the paragraph block).

mojavelinux added a commit to mojavelinux/asciidoctor that referenced this issue Jan 27, 2013
- also fix some typos left behind
@mojavelinux
Copy link
Member Author

I call this the "make the GFM crowd happy" feature 😉

I applied the replacement where line break characters are normally substituted. If we find that it's putting line breaks in too many places, we can always scale it back.

...note that this does slow down processing a pinch...0.05s on the AsciiDoc User Guide. But that's also because the User Guide hard wraps just about every single line of paragraph text.

@mojavelinux
Copy link
Member Author

Here's the upstream issue in AsciiDoc: http://code.google.com/p/asciidoc/issues/detail?id=16

erebor added a commit that referenced this issue Jan 28, 2013
Resolve issue #119, add hardbreaks option
@ghost ghost assigned mojavelinux Aug 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant