question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Option to skip parsing of disallowed nodes

See original GitHub issue

With the following code, nothing is rendered as the listItem node is not included in allowedTypes.

const source = `- hello`
<Markdown source={source} allowedTypes={['paragraph', 'emphasis', 'strong']} />

It would be nice to have an option to render any disallowed nodes with its markdown intact (ie. - hello). Using unwrapDisallowed doesn’t quite get what I’m after as the markdown code is not included (ie. hello).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
bjudsoncommented, Oct 4, 2018

@ajbeaven @sibartlett Try using the remark-disable-tokenizers plugin to ignore specific tokens:

import remarkDisableTokenizers from "remark-disable-tokenizers";

<ReactMarkdown
  plugins={[
    [
      remarkDisableTokenizers,
      { block: ["list"] }
    ]
  ]}>
  {markdownContent}
</ReactMarkdown>
0reactions
wooormcommented, Oct 8, 2020

The answer is indeed to use plugins

Read more comments on GitHub >

github_iconTop Results From Across the Web

Disallow multiple arguments (array) for individual key #1318
"duplicate-arguments-array" exists as a "yargs-parser" option to set this globally. But I don't see how to leave it enabled globally and disable ......
Read more >
Controlling browser features with Permissions Policy
Open Chrome DevTools. · Open the Application panel to check the allowed features and disallowed features of each frame. · In the sidebar,...
Read more >
Disallowed WP-CLI commands - WordPress VIP Documentation
Some built-in and VIP mu-plugin WP-CLI commands (and/or subcommands) are blocked from use on the VIP Platform to ensure the safety of a...
Read more >
Command-line API | Node.js v19.3.0 Documentation
Node.js comes with a variety of CLI options. These options expose built-in debugging, multiple ways to execute scripts, and other helpful runtime options....
Read more >
Command line options - Envoy Proxy
(optional) The YAML string for a bootstrap configuration. If --config-path is also set, the values in this YAML string will override and merge...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found