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

Allow multiple underscores inside a code block #4592

Closed
givanse opened this issue Dec 5, 2014 · 3 comments
Closed

Allow multiple underscores inside a code block #4592

givanse opened this issue Dec 5, 2014 · 3 comments
Labels
bug [triage] something behaving unexpectedly server / core Issues relating to the server or core of Ghost

Comments

@givanse
Copy link

givanse commented Dec 5, 2014

If I do this indside a code block:

____
____

The output is:

____
____

Might be related: #1552

@givanse
Copy link
Author

givanse commented Dec 6, 2014

I upgraded to 0.5.6 and it still reproduces.

@ErisDS ErisDS added bug [triage] something behaving unexpectedly affects:editor Work relating to the Koenig Editor labels Dec 7, 2014
@ErisDS ErisDS added this to the Next Backlog milestone Dec 7, 2014
@ErisDS
Copy link
Member

ErisDS commented Dec 7, 2014

Hi @givanse, thanks for raising this.

The issue you linked to shows that the code to process multiple underscores doesn't take code blocks into account. It should be relatively straightforward to either wrap the code in blocks which filter out code first, or move this code block into the 'GFM' block which already has this.

You can see what I mean here: https://github.com/TryGhost/Ghost/blob/master/core/shared/lib/showdown/extensions/ghostgfm.js#L34

ErisDS added a commit to ErisDS/Ghost that referenced this issue Apr 20, 2015
closes TryGhost#5039, TryGhost#5028, TryGhost#4659, TryGhost#4627, TryGhost#4592, TryGhost#1501

This PR pulls in the new version of showdown + adds and updates some tests to show what has changed

- Lots of additional whitespaces caused by a bad implementation of GFM newlines have been removed
- One fix with newlines + pre tags is now undone, but is now closer to all other markdown handlers
ErisDS added a commit to ErisDS/Ghost that referenced this issue Apr 20, 2015
closes TryGhost#5039, TryGhost#5028, TryGhost#4659, TryGhost#4627, TryGhost#4592, TryGhost#1501

This PR pulls in the new version of showdown + adds and updates some tests to show what has changed

- Lots of additional whitespaces caused by a bad implementation of GFM newlines have been removed
- One fix with newlines + pre tags is now undone, but is now closer to all other markdown handlers
ErisDS added a commit to ErisDS/Ghost that referenced this issue Apr 21, 2015
closes TryGhost#5039, TryGhost#5028, TryGhost#4659, TryGhost#4627, TryGhost#4592, TryGhost#1501

This PR pulls in the new version of showdown + adds and updates some tests to show what has changed

- Lots of additional whitespaces caused by a bad implementation of GFM newlines have been removed
- One fix with newlines + pre tags is now undone, but is now closer to all other markdown handlers
ErisDS added a commit to ErisDS/Ghost that referenced this issue Apr 21, 2015
closes TryGhost#5039, TryGhost#5028, TryGhost#4659, TryGhost#4627, TryGhost#4592, TryGhost#1501

This PR pulls in the new version of showdown + adds and updates some tests to show what has changed

- Lots of additional whitespaces caused by a bad implementation of GFM newlines have been removed
- One fix with newlines + pre tags is now undone, but is now closer to all other markdown handlers
ErisDS added a commit to ErisDS/Ghost that referenced this issue May 1, 2015
closes TryGhost#5039, TryGhost#5028, TryGhost#4659, TryGhost#4627, TryGhost#4592, TryGhost#1501

This PR pulls in the new version of showdown + adds and updates some tests to show what has changed

- Lots of additional whitespaces caused by a bad implementation of GFM newlines have been removed
- One fix with newlines + pre tags is now undone, but is now closer to all other markdown handlers
ErisDS added a commit to ErisDS/Ghost that referenced this issue May 2, 2015
closes TryGhost#5039, TryGhost#5028, TryGhost#4659, TryGhost#4627, TryGhost#4592, TryGhost#1501

This PR pulls in the new version of showdown + adds and updates some tests to show what has changed

- Lots of additional whitespaces caused by a bad implementation of GFM newlines have been removed
- One fix with newlines + pre tags is now undone, but is now closer to all other markdown handlers
@ErisDS ErisDS assigned ErisDS and unassigned dbalders May 12, 2015
@ErisDS ErisDS modified the milestone: Next Backlog Oct 9, 2015
@ErisDS ErisDS assigned ErisDS and unassigned ErisDS Oct 9, 2015
@anavarre
Copy link

anavarre commented Sep 15, 2016

To make sure I understand this issue, is what's happening such as below:

[my_link_here](https://mylink.tld)

Displays as mylinkhere instead of my_link_here?

The only way I've found to overcome that is to escape the first underscore. E.g.

[my\_link_here](https://mylink.tld)

Also, wouldn't it be a dupe of #1501

@ErisDS ErisDS added showdown and removed affects:editor Work relating to the Koenig Editor showdown labels Mar 15, 2017
@kirrg001 kirrg001 added the server / core Issues relating to the server or core of Ghost label May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [triage] something behaving unexpectedly server / core Issues relating to the server or core of Ghost
Projects
None yet
Development

No branches or pull requests

5 participants