-
Notifications
You must be signed in to change notification settings - Fork 18
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
How to disable some markdown syntax? Indented Code Blocks #181
Comments
function disableIndentedCode() {
const data = this.data();
add("micromarkExtensions", {
disable: { null: ["codeIndented"] },
});
/**
* @param {string} field
* @param {unknown} value
*/
function add(field, value) {
const list /** @type {Array<unknown>} */ =
// Other extensions
/* c8 ignore next 2 */
data[field] ? data[field] : (data[field] = []);
list.push(value);
}
}
const parserOptions = {
remark: {
plugins: {
["disable-indented-code"]: {
instance: disableIndentedCode,
},
},
},
};
<MDC
:value="element.text"
class="markdown-body"
:parser-options="parserOptions"
/> Tried with this solution, but it breaks the rendering of the strings where said syntax is included (the whole string is not rendered). |
Disabling core markdown features is out of the module's scope. I suggest creating a discussion in micromark since it is related to micromark. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there any way to disable specific markdown syntax? In my case, I need to disable indented code blocks, leaving only fenced code blocks.
Is it possible?
The text was updated successfully, but these errors were encountered: