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

feat: remark-mdx is not compatible with normal markdown syntaxes #206

Merged
merged 2 commits into from
Aug 5, 2020

Conversation

JounQin
Copy link
Member

@JounQin JounQin commented May 24, 2020

As remark-mdx@v2 is not compatible with normal markdown comment syntaxes anymore, so markdown and mdx files should be processed specifically.

@johno @wooorm

@codecov-commenter
Copy link

codecov-commenter commented May 24, 2020

Codecov Report

Merging #206 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #206   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          411       418    +7     
  Branches        76        78    +2     
=========================================
+ Hits           411       418    +7     
Impacted Files Coverage Δ
packages/eslint-mdx/src/parser.ts 100.00% <100.00%> (ø)
packages/eslint-plugin-mdx/src/rules/helper.ts 100.00% <100.00%> (ø)
packages/eslint-plugin-mdx/src/rules/remark.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7edaa59...909651f. Read the comment docs.

@JounQin JounQin marked this pull request as draft May 24, 2020 09:13
@JounQin
Copy link
Member Author

JounQin commented May 24, 2020

This branch is not required to merge for now, but would be better to publish a next tag for mdx-js/mdx itself.

@wooorm
Copy link
Member

wooorm commented May 25, 2020

Awesome work @JounQin! The PR is currently marked as draft. Does that mean that you‘re still working on it, and/or that it’s waiting for MDX@2?

@JounQin JounQin marked this pull request as ready for review May 30, 2020 04:25
@JounQin
Copy link
Member Author

JounQin commented May 30, 2020

The fix should be compatible between v1 and v2, so I think it's ready to merge!

// fix #4
if (isComment(value)) {
const comment = COMMENT_CONTENT_REGEX.exec(value)[2]
this._ast.comments.push({
Copy link
Member

Choose a reason for hiding this comment

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

Does _ast here point to the whole ES AST? If so, it won’t work if a part but not the whole document is ignored maybe?

https://github.com/remarkjs/remark-message-control#markers

Copy link
Member Author

Choose a reason for hiding this comment

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

It is only for <!-- eslint-disable ruleId -->.

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

Successfully merging this pull request may close these issues.

None yet

3 participants