Skip to content

fix(export): resolve frontmatter table styling and parsing in HTML an…#114

Closed
ThisIs-Developer wants to merge 3 commits into
mainfrom
fix-frontmatter-export-styling
Closed

fix(export): resolve frontmatter table styling and parsing in HTML an…#114
ThisIs-Developer wants to merge 3 commits into
mainfrom
fix-frontmatter-export-styling

Conversation

@ThisIs-Developer

Copy link
Copy Markdown
Owner

Description

This pull request addresses YAML Frontmatter parsing and styling issues in both the web and desktop app versions for both HTML and PDF exports.

Changes Included

  1. HTML Export Styling (Web & Desktop):

    • Added support for .fm-tag in the inline styles of exported HTML documents so tags/lists render as pill tags matching the main viewer interface's light and dark themes.
    • Added support for .fm-complex to properly style nested JSON/YAML objects in monospace blocks.
    • Improved .frontmatter-table rules (vertical alignments, text alignments, borders, and background zebra-striping).
  2. PDF Export Parsing (Web & Desktop):

    • Updated the exportPdf listener to run the frontmatter parser (parseFrontmatter) and render the frontmatter table (renderFrontmatterTable()), prepending it to the document body prior to PDF generation.
  3. Desktop App Build Assets:

    • Executed the build preparation script to copy updated scripts/styles and regenerate the desktop resources.

Copilot AI review requested due to automatic review settings May 25, 2026 16:32
@vercel

vercel Bot commented May 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment May 25, 2026 4:48pm

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves YAML frontmatter handling in exports by ensuring frontmatter is parsed and rendered as a table for PDF export, and by enhancing the exported HTML’s inline styling so frontmatter tables/tags render consistently across light/dark themes in both the web and desktop builds.

Changes:

  • Enhanced exported HTML inline CSS for .frontmatter-table, plus added .fm-tag and .fm-complex styling (web + desktop export templates).
  • Updated PDF export flow to parse YAML frontmatter and prepend the rendered frontmatter table before generating the PDF (web + desktop).
  • Refreshed some desktop resource assets (CSS tweaks, modal attributes, etc.).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
script.js Updates exported HTML inline frontmatter styling and prepends rendered frontmatter table during PDF export generation.
desktop-app/resources/styles.css Tweaks mobile menu overlay behavior and tab border styling in desktop resources.
desktop-app/resources/js/script.js Mirrors the web export changes for frontmatter styling/parsing in desktop build output (plus small related updates).
desktop-app/resources/index.html Adds aria-hidden defaults to several desktop modals (but see comment about Mermaid zoom modal).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


<!-- Mermaid Zoom Modal -->
<div id="mermaid-zoom-modal" role="dialog" aria-modal="true" aria-label="Diagram zoom view">
<div id="mermaid-zoom-modal" role="dialog" aria-modal="true" aria-label="Diagram zoom view" aria-hidden="true">
…document while preventing horizontal rule collisions
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 25, 2026

Copy link
Copy Markdown

Deploying markdown-viewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 17a795f
Status: ✅  Deploy successful!
Preview URL: https://ad8ff958.markdown-viewer.pages.dev
Branch Preview URL: https://fix-frontmatter-export-styli.markdown-viewer.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 25, 2026

Copy link
Copy Markdown

Deploying markdownviewer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 17a795f
Status: ✅  Deploy successful!
Preview URL: https://c0e38e14.markdownviewer.pages.dev
Branch Preview URL: https://fix-frontmatter-export-styli.markdownviewer.pages.dev

View logs

…PDF exports while maintaining strict first-line standards
@ThisIs-Developer ThisIs-Developer deleted the fix-frontmatter-export-styling branch May 25, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants