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

turndown-plugin-gfm: Fixes #10328 fix compatibility with turndown #10931

Closed
wants to merge 1 commit into from

Conversation

rrgeorge
Copy link

Fixes #10328 as recommended by @flaviut to maintain compatibility with turndown

Fixes laurent22#10328 as recommended by @flaviut to maintain compatibility with turndown
Copy link
Contributor

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@laurent22
Copy link
Owner

Doesn't build

2024-08-26T05:05:54.5809490Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]: src/gfm.js → lib/turndown-plugin-gfm.cjs.js...
2024-08-26T05:05:54.6079490Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]: [!] Error: Unexpected token
2024-08-26T05:05:54.6083270Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]: src/tables.js (182:41)
2024-08-26T05:05:54.6151080Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]: 180:   for (let i = 0; i < node.childNodes.length; i++) {
2024-08-26T05:05:54.6184020Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]: 181:     const child = node.childNodes[i];
2024-08-26T05:05:54.6207870Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]: 182:     if (types === 'code' && isCodeBlock_?.(child)) return true;
2024-08-26T05:05:54.6217470Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]:                                               ^
2024-08-26T05:05:54.6225630Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]: 183:     if (types.includes(child.nodeName)) return true;
2024-08-26T05:05:54.6277060Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]: 184:     if (nodeContains(child, types)) return true;
2024-08-26T05:05:54.6282040Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]:
2024-08-26T05:05:54.6283960Z ➤ YN0000: │ root@workspace:. STDOUT ➤ YN0000: [@joplin/turndown-plugin-gfm]: Process exited (exit code 1), completed in 0s 984ms

@laurent22 laurent22 closed this Aug 26, 2024
@flaviut
Copy link

flaviut commented Aug 26, 2024

weird that it doesn't compile, optional chaining has been a standard JS feature since 2020.

Should be easy enough to change (I can't sign that CLA though and do it myself)

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.

bug(turndown-plugin-gfm): incompatible with original turndown
3 participants