-
Notifications
You must be signed in to change notification settings - Fork 137
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 compact_output
option
#394
Conversation
4c88b4c
to
9983c7b
Compare
As discussed in pragdave#393 (comment). I did not name the option "single_line", since newlines in code blocks are preserved even with it on and since Earmark passes the single newlines from the input to the final output. Also removes some string concatenations and replaces single-character binaries with character codes. I did not find a file the tests for this feature would fit in, so I created a new one at `test/acceptance/html/compact_output_test.exs` Closes pragdave#391
9983c7b
to
884ce43
Compare
Ty for your work, appreciated I will plan a release within the week |
@rinpatch scratch the last remark, I have 10 failing tests after the merge (but only locally Travis is still happy) I have to check that out first |
So here is the problem I am having Interactive Elixir (1.11.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> Earmark.as_html("[link](/uri \"title\") [link](/uri \"title\")")
{:ok,
"<p>\n<a href=\"/uri\" title=\"title\">link</a><a href=\"/uri\" title=\"title\">link</a></p>\n",
[]} There is not a space anymore between the two links which is clearly needed, hopefully I can fix this but I will do so in a side branch and revert the merge, sorry! BTW. Still no idea why Travis does not catch these errors, you should see them locally too here is the corresponding test
|
@rinpatch your patch is fine this is just a strange hiccup I have to sort out sorry for the delay, please stand by. |
@rinpatch I managed to clean up the mess on my local machines, and just released v1.4.12 which, of course, contains your PR again Well done and thank you |
This is great! I have been on 1.4.4 for a while now due to the whitespace changes, but this passed all my tests except one:
There seems to be 2 extra spaces inserted in nr 2 there :) |
|
... and released 1.4.13 |
Haha, thanks @RobertDober ! You're too fast for me 😅 |
As discussed in
#393 (comment).
I did not name the option "single_line", since newlines in code blocks
are preserved even with it on and since Earmark passes
the single newlines from the input to the final output.
Also removes some string concatenations and replaces single-character
binaries with character codes.
I did not find a file the tests for this feature would fit in, so
I created a new one at
test/acceptance/html/compact_output_test.exs
Closes #391