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

backtick code tag should ignore spaces #69

Closed
sma opened this issue Aug 19, 2012 · 2 comments
Closed

backtick code tag should ignore spaces #69

sma opened this issue Aug 19, 2012 · 2 comments

Comments

@sma
Copy link

sma commented Aug 19, 2012

The inline tags

(` a `)
(``  `  ``)

should render as

(<code>a</code>)
(<code>`</code>)

and not include the spaces required to separate ``` from ````. (Just compare with this rendering).

This can be achieved by adding trim() in https://github.com/chjj/marked/blob/master/lib/marked.js#L459.

@chjj chjj closed this as completed in 48e766a Jan 10, 2013
@yuchi
Copy link

yuchi commented Jan 10, 2013

Shouldn't

``  `  ``

(with 2 spaces around) format to [space][backtick][space]?

@chjj
Copy link
Member

chjj commented Jan 10, 2013

Not according to markdown.pl.

ghost pushed a commit to zergeborg/marked that referenced this issue May 13, 2016
The inline code regex itself could also simply have \s* prepended
and appended to outside the main capture. However, this results
in less accurate behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants