Skip to content

[Auto generated by Zed] #271

Description

@Sumanth-NR

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch rehype-pretty-code@0.14.3 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/rehype-pretty-code/dist/index.js b/node_modules/rehype-pretty-code/dist/index.js
index 212c419..2d01c38 100644
--- a/node_modules/rehype-pretty-code/dist/index.js
+++ b/node_modules/rehype-pretty-code/dist/index.js
@@ -22,7 +22,7 @@ function isInlineCode(element, parent, bypass = false) {
   return element.tagName === "code" && isElement(parent) && parent.tagName !== "pre" || element.tagName === "inlineCode";
 }
 function isBlockCode(element) {
-  return element.tagName === "pre" && Array.isArray(element.children) && element.children.length === 1 && isElement(element.children[0]) && element.children[0].tagName === "code";
+  return false;
 }
 function getInlineCodeLang(meta, defaultFallbackLang) {
   const placeholder = "\0";

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions