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

fix code blocks #2622

Merged
merged 1 commit into from
Nov 25, 2018
Merged

fix code blocks #2622

merged 1 commit into from
Nov 25, 2018

Conversation

daiyam
Copy link
Contributor

@daiyam daiyam commented Nov 18, 2018

Description

The change fixes the issue with code blocks described in #2614.
The bug was introduced with the PR #2394 (by me 😱)

Issue fixed

Type of changes

  • 🔘 Bug fix (Change that fixed an issue)
  • ⚪ Breaking change (Change that can cause existing functionality to change)
  • ⚪ Improvement (Change that improves the code. Maybe performance or development improvement)
  • ⚪ Feature (Change that adds new functionality)
  • ⚪ Documentation change (Change that modifies documentation. Maybe typo fixes)

Checklist:

  • 🔘 My code follows the project code style
  • ⚪ I have written test for my code and it has been tested
  • 🔘 All existing tests have been passed
  • ⚪ I have attached a screenshot/video to visualize my change if possible

@ZeroX-DG
Copy link
Member

XSS bug and now this? Shame on you hahaha 😄 Anyway, thank you for the fix, I'll review it soon.

@@ -12,7 +12,7 @@ module.exports = function (md, renderers, defaultRenderer) {
}

const marker = state.src.charCodeAt(pos)
if (!(marker === 96 || marker === 126)) {
if (marker !== 0x7E/* ~ */ && marker !== 0x60 /* ` */) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind to add a coment explaining what the chars are you're using as markers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are the GFM characters for the fenced code blocks.
Not sure what to comment...

Copy link
Contributor

@ehhc ehhc Nov 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't mind my comment.. i wanted you to write that 0x7E means ~ and 0x60 ` but you already did that and i simply didn't understand your code.. I'm sorry for the supid comment :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like:

// If the first character is not "open code blocks character " then return false

Seem redundant hahaha 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm.. i think you can just ignore my initial question and everything is fine :)

Copy link
Member

@ZeroX-DG ZeroX-DG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@ZeroX-DG ZeroX-DG added approved 👍 Pull request has been approved by sufficient reviewers. and removed awaiting review ❇️ Pull request is awaiting a review. labels Nov 22, 2018
@Rokt33r Rokt33r added next release (v0.11.12) and removed approved 👍 Pull request has been approved by sufficient reviewers. labels Nov 25, 2018
@Rokt33r Rokt33r merged commit 0b6c0e6 into BoostIO:master Nov 25, 2018
@daiyam daiyam deleted the fix-fence branch November 25, 2018 11:11
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

Successfully merging this pull request may close these issues.

4 participants