remarkjs/remark

When I use 'remark-gfm 'to parse the table, it will get stuck

luoluo5945 opened this issue · 2 comments

Initial checklist

Affected packages and versions

"remark": "^14.0.2", "remark-gfm": "^3.0.1",

Link to runnable example

No response

Steps to reproduce

import {remark} from 'remark';
import slug from 'remark-slug';
import githubFlavored from 'remark-gfm';
import htmlPlugin from 'remark-html';

const getHtml = (content: string) => {
    return remark()
        .use(slug)
        .use(githubFlavored)
        .use(htmlPlugin, {sanitize: false})
        .processSync(content)
        .toString();
};

TIP:The following is the markdown file where I encountered the problem. I tried to check the file with lint-md and found no problem, but the page froze after parsing with the above function, which was initially attributed to the use of the 'remark-gfm 'plugin

## config

| Configuration Key  | Configuration Value                                                                      | Comment                                                                           |
|--------------------|------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| Endpoint           | workspace                                                                                | title                                                                        |
| ---                | ---                                                                                      | ---                                                                               |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| Region             | where                                                                                       | title                                                                |
| ---                | ---                                                                                      | ---                                                                               |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| DeviceHubLocalName | dh-1                                                                                     | Windmill-device devicehub                             |
| ---                | ---                                                                                      | ---                                                                               |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| TimeoutMS          | 20000                                                                                    | tsm/meerkat                                                            |
| ---                | ---                                                                                      | ---                                                                               |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| TimeoutMS          | 60000                                                                                    | gaea-transform                                                       |
| ---                | ---                                                                                      | ---                                                                               |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| aaa | aaa | ccc | 
| GPUMem             | 5000                                                                                     | trt                                                                  |
| ---                | ---                                                                                      | ---                                                                               |
| ***Servings***       | ***Servings***                                                                           | title                                                |
| ***Edge***          | ***Edge***                                                                               | title                                                                      |
| aaa | aaa | ccc |
| aaa | aaa | ccc |
| aaa | aaa | ccc |

Expected behavior

Normal analysis

Actual behavior

Page stuck

Runtime

No response

Package manager

yarn 1

OS

macOS

Build and bundle tools

Webpack

Hey @luoluo5945! 👋
Sorry you ran into a spot of trouble.
I'm unable to replicate the issue as you describe in a sandbox
https://codesandbox.io/s/remark-slug-gfm-and-html-o11b1g

Some ideas on how to debug:

  1. check that all dependencies are up-to-date
  2. check which version of node you are using, consider using the latest LTS (https://nodejs.org/en)
  3. check if you have any other scripts on the page which could be causing it to freeze

Feel free to add a minimal reproducible example in a sandbox, like codesandbox or stackblitz, if you still believe this is a bug here.
For now I'm closing this out as it doesn't appear to be an issue here.

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.