-
Notifications
You must be signed in to change notification settings - Fork 0
Remove-style-injection #6
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
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ⛔ Deployment terminated View logs |
markdown-wc | d7e3f4d | Commit Preview URL Branch Preview URL |
Jan 12 2026, 01:06 AM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f829f6ce0f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| protected override createRenderRoot() { | ||
| return this | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preserve base inheritance for nested embeds
Switching to light DOM rendering via createRenderRoot() means getRootNode() now returns the document, but inheritBaseFromParent() still scans root.childNodes for the <!--mwc-base=...--> comment (same file, inheritBaseFromParent). That comment is inserted inside the parent <markdown-wc-embed> element, not at the document root, so nested embeds no longer inherit base. As a result, relative src/import URLs inside nested embeds resolve against the document base instead of the parent’s base (e.g., parent base="/docs" + child src="./intro.md" loads /intro.md instead of /docs/intro.md). Consider searching parent nodes or propagating base another way when using light DOM.
Useful? React with 👍 / 👎.
| if (this.arrow !== undefined && this.arrow !== null) { | ||
| return this.arrow | ||
| } | ||
| return this.isExternalLink() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arrow default behavior for external links never activates
Medium Severity
The shouldShowArrow() method never reaches its fallback logic for external links. The arrow property is initialized to false on line 109, so the condition this.arrow !== undefined && this.arrow !== null on line 128 always evaluates to true (since false is neither undefined nor null). This means the method always returns false when the attribute isn't explicitly set, instead of returning this.isExternalLink() as the fallback. The documentation states arrows should default to showing for external links, but this implementation prevents that behavior.
Note
<markdown-wc-embed>now renders in light DOM; inheritsmwc-basefrom ancestor comments; minor URL resolution tweak; added jsdom tests.default.cssto.markdown-wc-bodywith VitePress-like markdown styles and copy-button hooks.doc-cardanddoc-columnscomponents; removes obsolete elements (accordion, callout, comments, copy, feature(s), figure, header, hero, icon, link(s), pricing, slider).website/(TanStack React Start + Vite) to render README and doc-elements; Cloudflare Wrangler config and ignore file included.Written by Cursor Bugbot for commit d7e3f4d. This will update automatically on new commits. Configure here.