Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

fix code blocks#2622

Merged
Rokt33r merged 1 commit into
BoostIO:masterfrom
daiyam:fix-fence
Nov 25, 2018
Merged

fix code blocks#2622
Rokt33r merged 1 commit into
BoostIO:masterfrom
daiyam:fix-fence

Conversation

@daiyam

@daiyam daiyam commented Nov 18, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

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


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

Copy link
Copy Markdown
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
Copy Markdown
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...

@ehhc ehhc Nov 19, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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 :)

@ZeroX-DG ZeroX-DG left a comment

Copy link
Copy Markdown
Member

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

4 participants