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

HTML code tag on the same line with starting code block breaks everything #229

Closed
DoumanAsh opened this issue Jan 24, 2016 · 12 comments
Closed
Assignees
Labels

Comments

@DoumanAsh
Copy link

Noticed strange behavior of parser while testing with this fixture

Try to parse text under Code and Syntax Highlighting section
http://i.imgur.com/7JWC4Cv.png

It happens when you have starting <code> and ``` on the same line.
If you separate it by newline everything will be fine

I saved this bad section on my google drive also:
https://docs.google.com/document/d/1AU-BEsR4bUnSXFtkuJfCylOaBrLmadCk7tqEzAThfS4/edit?usp=sharing

@DoumanAsh DoumanAsh changed the title HTML code tag on the same line with starting code block HTML code tag on the same line with starting code block breaks everything Jan 24, 2016
@tivie tivie added the bug label Jan 24, 2016
@tivie tivie self-assigned this Jan 24, 2016
@tivie
Copy link
Member

tivie commented Jan 24, 2016

Thanks @DoumanAsh

You are correct, the bug is verified. (can see in demo page here)

I will post a fix as soon as possible.

@DoumanAsh
Copy link
Author

Glad to hear. I'm planning to replace marked in my simple client-side parser with Snowdown :)

@DoumanAsh
Copy link
Author

Please note that markdown code symbols are missing inside of html <code>.
Please check after fix that it will be corrected too :)

UPD: noticed that they are actually getting parsed inside html <code>. Not sure if it is specified, but i assume it should not be so?

@tivie
Copy link
Member

tivie commented Jan 24, 2016

@DoumanAsh

Please note that markdown code symbols are missing inside of html <code>.

What do you mean?

@DoumanAsh
Copy link
Author

See this example

Note that there are <code> blocks inside another <code> blocks.
At least in case of Github and marked markdown is not parsed inside html <code> block.
But i'm not sure what is right behavior though

@tivie
Copy link
Member

tivie commented Jan 24, 2016

@DoumanAsh I thought that was precisely the issue you were talking about.

@DoumanAsh
Copy link
Author

Sorry, there are actually two issues :)
First
Second

In these cases parser has different misbehavior

@tivie
Copy link
Member

tivie commented Jan 24, 2016

Both are consequence of the same issue that is the fact that GitHub code blocks insede HTML Code blocks get parsed by markdown engine while they shouldn't.

tivie added a commit that referenced this issue Jan 25, 2016
When using html pre/code tags to wrap github's fenced code block syntax,
showdown would parsed them instead of treating them like plain code.

Closes #229
@tivie
Copy link
Member

tivie commented Jan 25, 2016

Should be fixed now

See demo

@DoumanAsh
Copy link
Author

Looks great! Thanks

@DoumanAsh
Copy link
Author

Should we close issue then?

@DoumanAsh
Copy link
Author

Since it is fixed on develop branch i'm closing issue. No sense in leaving it opened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants