You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use the remarkGfm plugin with the solid-markdown library to render GitHub Flavored Markdown, but I am encountering an error in the console when I include the plugin.
Steps to Reproduce:
Create a new SolidJS project and install the solid-markdown and remark-gfm packages.
Import SolidMarkdown from solid-markdown and remarkGfm from remark-gfm.
Use the SolidMarkdown component with the remarkGfm plugin passed to the remarkPlugins prop.
Specifically I'm using this example for the markdown:
constmarkdown=` # h1 Heading 8-) ## h2 Heading ### h3 Heading #### h4 Heading ##### h5 Heading ###### h6 Heading ## Horizontal Rules ___ --- *** ## Typographic replacements Enable typographer option to see result. (c) (C) (r) (R) (tm) (TM) (p) (P) +- test.. test... test..... test?..... test!.... !!!!!! ???? ,, -- --- "Smartypants, double quotes" and 'single quotes' ## Emphasis **This is bold text** __This is bold text__ *This is italic text* _This is italic text_ ~~Strikethrough~~ ## Blockquotes > Blockquotes can also be nested... >> ...by using additional greater-than signs right next to each other... > > > ...or with spaces between arrows. ## Lists Unordered + Create a list by starting a line with \`+\`, \`-\`, or \`*\` + Sub-lists are made by indenting 2 spaces: - Marker character change forces new list start: * Ac tristique libero volutpat at + Facilisis in pretium nisl aliquet - Nulla volutpat aliquam velti + Very easy! Ordered 1. Lorem ipsum dolor sit amet 2. Consectetur adipiscing elit 3. Integer molestie lorem at massa 1. You can use sequential numbers... 1. ...or keep all the numbers as \`1.\` Start numbering with offset: 57. foo 1. bar ## Code Inline \`code\` Indented code // Some comments line 1 of code line 2 of code line 3 of code Block code "fences" \`\`\` Sample text here... \`\`\` Syntax highlighting \`\`\` js var foo = function (bar) { return bar++; }; console.log(foo(5)); \`\`\` ## Tables | Option | Description | | ------ | ----------- | | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. | Right aligned columns | Option | Description | | ------:| -----------:| | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. | `;
Something as simple as this also reproduces error: const markdown = `\`a\``;
Expected Behavior:
The markdown should be rendered correctly with GitHub Flavored Markdown support.
Actual Behavior:
The following error is thrown in the console:
Uncaught TypeError: Cannot read properties of undefined (reading 'inTable')
at Object.exitCodeText (remark-gfm.js?v=a628acdb:2423:17)
at compile (solid-markdown___remark-parse.js?v=a628acdb:1724:40)
at fromMarkdown (solid-markdown___remark-parse.js?v=a628acdb:1586:29)
at parser (solid-markdown___remark-parse.js?v=a628acdb:2314:12)
at Function.parse (solid-markdown___unified.js?v=a628acdb:352:12)
at Object.fn (dev.jsx:374:50)
at runComputation (chunk-5NS34ZCI.js?v=a628acdb:766:22)
at updateComputation (chunk-5NS34ZCI.js?v=a628acdb:749:3)
at createMemo (chunk-5NS34ZCI.js?v=a628acdb:267:5)
at SolidMarkdown (dev.jsx:363:24)
Environment:
solid-markdown version: 2.0.13
remark-gfm version: 4.0.0
SolidJS version: 1.8.11
Additional Information: This repository demonstrates the issue in a minimal setup (specifically in the App.tsx). When the remarkGfm plugin is included in the remarkPlugins prop of the SolidMarkdown component, the error occurs. Removing the plugin resolves the error but loses the GitHub Flavored Markdown functionality.
The text was updated successfully, but these errors were encountered:
I think it's a version mismatch issue, solid-markdown definitely works with remark-gfm3.0.1
I can't support higher versions yet due to a bug in how the library gets bundled (this one here: #33)
I am trying to use the
remarkGfm
plugin with thesolid-markdown
library to render GitHub Flavored Markdown, but I am encountering an error in the console when I include the plugin.Steps to Reproduce:
Specifically I'm using this example for the markdown:
Something as simple as this also reproduces error:
const markdown = `\`a\``;
Expected Behavior:
The markdown should be rendered correctly with GitHub Flavored Markdown support.
Actual Behavior:
The following error is thrown in the console:
Environment:
Additional Information:
This repository demonstrates the issue in a minimal setup (specifically in the App.tsx). When the
remarkGfm
plugin is included in theremarkPlugins
prop of theSolidMarkdown
component, the error occurs. Removing the plugin resolves the error but loses the GitHub Flavored Markdown functionality.The text was updated successfully, but these errors were encountered: