feat: refactor export system and improve PDF/email handling

Major improvements to PDF export functionality and code organization:

- BREAKING: Refactor main.ts from 4224 to 994 lines by extracting modular components
- Replace broken PDF links with proper Typst pdf.embed() attachments
- Filter out unnecessary "Open:" links and Mail.app links from exports
- Fix duplicate title issue by replacing frontmatter title with filename
- Move temp file processing from system temp to plugin folder
- Clean up temp-images and temp-pandoc directories after export
- Remove timestamp from export filenames to match note names exactly
- Handle Unicode line separators (0x2028, 0x2029) in email content
- Improve markdown preprocessing with better frontmatter handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jarvis committed 2025-09-02 17:16:55 +02:00
1 parent 175fad5b4e
commit 172a69161d
20 files changed
+7166 -3936

No files matched your search

+10 -1
View File
@@ -99,6 +99,7 @@
// Set page layout with conditional height based on export format
set page(
paper: paper,
orientation: orientation,
margin: page-margin,
..if export_format == "single-page" { (height: auto,) } else { (:) },
numbering: pagenumbering,
@@ -136,7 +137,7 @@
)
// Magazine-style paragraphs
set par(justify: true, leading: 0.7em, first-line-indent: 0.8em)
set par(justify: false, leading: 0.7em, first-line-indent: 0.8em)
// No heading numbering for magazine style
if sectionnumbering != none {
@@ -182,6 +183,14 @@
#it.body #h(0.5em) #line(length: 3cm, stroke: 1pt + rgb("#93c5fd"))
]
// Apply monospace font to code blocks and inline code
let code-font = if monospace_font != none and type(monospace_font) == str {
(monospace_font, "Courier New", "Monaco")
} else {
("Courier New", "Monaco")
}
show raw: set text(font: code-font)
// Decorative title block with background
if title != none and title != "" [