Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Global process=false flag #503

Closed
jmduke opened this issue Apr 26, 2024 · 1 comment
Closed

Global process=false flag #503

jmduke opened this issue Apr 26, 2024 · 1 comment

Comments

@jmduke
Copy link

jmduke commented Apr 26, 2024

We're porting our docs to Markdoc (backed by Keystatic) and got bitten pretty hard by the issue described in #72 and #306 because our docs have a lot of handlebar-ish code blocks, and it's somewhat hard to enforce the process=false tag in every single code block. @rpaul-stripe mentioned adding a global configuration for this and I'm opening this issue to formally suggest that.

(I would also argue that the default should probably be process=false rather than process=true, but that's a different discussion!)

@mfix-stripe
Copy link
Contributor

@jmduke you can handle this by creating a custom fence Node and setting the new default.

Pseudocode:

import {nodes} from '@markdoc/markdoc'

// ...
nodes: {
  fence: {
    ...nodes.fence,
    attributes: {
      ...nodes.fence.attributes,
      process: { ...nodes.fence.attributes.process, default: false },
    }
  }
}
     

@markdoc markdoc locked and limited conversation to collaborators Apr 26, 2024
@mfix-stripe mfix-stripe converted this issue into discussion #504 Apr 26, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants