kjdev / hoextdown

Hoextdown is an extension to Hoedown
MIT License
23 stars 15 forks source link

Strip whitespace, not just spaces, from the beginning and ends of codespans #18

Closed jasharpe closed 9 years ago

jasharpe commented 9 years ago

Without this, you get an ugly extra space at the end of codespans that end with a new line, in the rendered form in the browser (at least in Chrome).

Consider this example:

screen shot 2015-09-22 at 10 42 29 pm

This is from

`foo
` bar

The top line is AFTER the change. The codespan hugs its contents, and looks good.

The bottom line is BEFORE the change. The codespan covers the space just after the codespan's contents, and looks ugly.