Questions tagged [remarkjs]

A JavaScript library that creates client-side HTML5 slideshows from Markdown source. Or an unrelated Markdown parser used by Gatsbyjs.

Remark.js (also on GitHub) is a JavaScript library that creates client-side slideshows from Markdown source.

Remark is also the name of a collection of libraries for working with Markdown. Despite the name and shared concepts, Remark.js is not built on Remark, the JavaScript library.

See also:

98 questions
0
votes
1 answer

Extract specific tags using 'remark' in js

I am making a blog using markdown. From next.js. After reading markdown using fs, the process of converting it to html is as follows. const markdownToHtml = async (markdownValue: string) => { const processedValue = await unified() …
nyamDal
  • 5
  • 2
0
votes
1 answer

How can I filter frontmatter in a remark plugin?

In an AstroJS site, I've set up a remark plugin to apply a default layout to .md(x) documents if one is not explicitly set. The code comes from the RFC in issue #397 and works well. I'd now like to use the component to break large…
0
votes
1 answer

How to disable indented code block in markdown astro

I want to disable indented code blocks since I find them very unintuitive in my markdown. I tried following https://www.npmjs.com/package/remark-disable-tokenizers how it seems this is not up to date with the remark-parse library. I note that…
0
votes
0 answers

convert markdown to html safe and without loss of content

I perform the conversion from markdown to html using remark-rehype. I know about "fenced code blocks" and use it. I expect to get

escaped html

from a string that for some reason may contain jsx or other code passed to markdown due to…
i like Cola
  • 277
  • 6
  • 15
0
votes
1 answer

How can I use Remark with Astro to make my posts written in markdown preserve the styling?

I have a blog written in Astro and I write my posts in markdown. I'm having troubles using remark and remark-html to pass my md tags (such as ##) when I render the post. async function remarkContent(content) { const file = await remark() …
0
votes
0 answers

How to fix Cannot find module 'mdast-util-from-markdown/lib' error

I have a Node.js (v16.15.0) script that uses TypeScript (v4.9.3) and I want to use remark-parse (v10.0.1) to parse Markdown into AST. However I get this error: > tsc --outDir dist node_modules/remark-parse/lib/index.d.ts:3:26 - error TS2307: Cannot…
jared_hexagon
  • 175
  • 1
  • 1
  • 10
0
votes
1 answer

How to use "remark" to process Markdown files containing some URLs without markdown formatting? Any extra plugins?

I have following markdown file with frontmatter. The markdown content sometimes contains inline URLs which are not formatted with markdown's URL syntax. Is there any way to deal with those non-markdown URLs inside the markdown file, and somehow…
0
votes
1 answer

Return values from Remark rather than a promise

I have a JSON file wth a list of markdown values, I'm using Remark to parse them to HTML. After each value is parsed I add it to an object so it's accessible, however I think I'm getting stuck somewhere in promise land because the values in the…
tfantina
  • 788
  • 11
  • 37
0
votes
1 answer

how to add data-attribute at markdown code block?

I want this format Hello I want to be make this format using markdown

        
Hyesung Oh
  • 163
  • 1
  • 9
0
votes
1 answer

Configure remark-lint-no-undefined-references plugin/rule 'Allow' option for remark-cli?

Original Question How do I correctly "configure" the (unified, remark, remark-lint) remark-lint-no-undefined-references plugin/rule "allow" option for use with the remark-cli? My goal is to configure the rule to ignore the Azure DevOps Wiki's…
ScottWelker
  • 1,701
  • 17
  • 30
0
votes
0 answers

How to use ```code``` in my remark-gfm react-markdown website?

My site is made using react-static and now I want to add remark-gfm. To have a code snippet I use three ticks. To create a multiline section, I have to use a single tick. This breaks the triple tick code indicator. My question is how to make…
OrigamiEye
  • 864
  • 1
  • 12
  • 31
0
votes
1 answer

react-markdown shows div instead of element tag when using custom component

I'm trying to write a custom plugin for underline support ( with ~the underlined text~ syntax ) in react-markdown ( remark ) and the problem is the result uses div tag instead of ins. here is the plugin: const UNDERLINE_REGEX = /~(.*)~/g; const…
amdigbari
  • 21
  • 3
0
votes
1 answer

highlight.js is not working with markdown in Next.js App

I'm creating a next.js blog. Using the remark library, we converted markdown into html language and applied markdown styling. The problem is that I want to use highlight.js to put a theme on the code. I've checked to load the desired css file, but…
0
votes
0 answers

Generate a index of documents in Gridsome

I created a documentation site with Gridsome and vuew-remark. I grouped the documents per folder. Having a structure like this: -docs -topic1 -document1.md -document2.md -topic2 -document3.md -document4.md I want a page with the…
David SK
  • 814
  • 7
  • 21
0
votes
1 answer

How to clear value textbox in SharePoint Online

I have an issue in the SharePoint Online environment. I have control Name field 'Remark' with the scenario: Before approver 1 to do approved on approvals process, approver 1 to do edit item in SharePoint, put Remark as a note for approver 2. after…
Kfajar
  • 31
  • 5