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 emphasis with underscore inside word #1399

Closed
wants to merge 2 commits into from

Conversation

mccraveiro
Copy link
Contributor

Marked version: master branch

Markdown flavor: CommonMark

Description

Input

пристаням_стремятся_

Expectation

<p>пристаням_стремятся_</p>

Result

<p>пристаням<em>стремятся</em></p>

What was attempted

Fix emphasis with underscore inside word by implementing "left flanking delimiter"

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

  • Draft GitHub release notes have been updated.
  • CI is green (no forced merge required).
  • Merge PR

@mccraveiro
Copy link
Contributor Author

Regex lookbehind assertions are not available on node v4 😞
By the way, shouldn't we move to node v6 as node v4 end-of-life was on April?

https://github.com/nodejs/Release#end-of-life-releases

lib/marked.js Outdated Show resolved Hide resolved
@UziTech
Copy link
Member

UziTech commented Dec 20, 2018

I'm ok with removing node v4 support.

@mccraveiro
Copy link
Contributor Author

It seems that Regex Lookbehind is behind a flag on node v6.
I'll try to solve this problem with another regex pattern.

@mccraveiro
Copy link
Contributor Author

@UziTech By the time being I've moved the last 2 commits to another PR so we can move on #1400

@mccraveiro
Copy link
Contributor Author

It's way harder to implement without lookbehind assertions. I'll close this PR for now.

@mccraveiro mccraveiro closed this Dec 20, 2018
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.

2 participants