Skip to content

Commit 529bb20

Browse files
committed
Quartz sync: Jun 1, 2025, 9:45 PM
1 parent 2c16ee2 commit 529bb20

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

quartz/components/styles/mindmap.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
}
4343
}
4444

45-
text,
4645
foreignObject,
4746
foreignObject * {
4847
user-select: none !important;

quartz/plugins/transformers/mindmap.ts

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,16 @@ function wikilinkReplacement(currentSlug: FullSlug, transformOptions: TransformO
9292
const width = imageEmbedMatch?.groups?.width ? imageEmbedMatch?.groups?.width + "px" : "auto"
9393
const height = imageEmbedMatch?.groups?.height ? imageEmbedMatch?.groups?.height + "px" : "auto"
9494
return `<img src="${url}" alt="${fragment ?? displayText ?? link}" style="height:${height}; width:${width}; max-width: 640px;" />`
95-
} else if (/\.(mp4|webm|ogv|avi|mov|flv|wmv|mkv|mpg|mpeg|m4v)$/.test(link)) {
96-
return `<video src="${url}" controls></video>`
97-
} else if (/\.(mp3|wav|m4a|ogg|3gp|flac)$/.test(link)) {
98-
return `<audio src="${url}" controls style="width: 640px;"></audio>`
99-
} else if (/\.(pdf)$/.test(link)) {
100-
return `<iframe src="${url}" class="pdf" style="width: 860px;"></iframe>`
10195
}
96+
// else if (/\.(mp4|webm|ogv|avi|mov|flv|wmv|mkv|mpg|mpeg|m4v)$/.test(link)) {
97+
// return `
98+
// <video src="${url}" controls/>
99+
// `
100+
// } else if (/\.(mp3|wav|m4a|ogg|3gp|flac)$/.test(link)) {
101+
// return `<audio src="${url}" controls />`
102+
// } else if (/\.(pdf)$/.test(link)) {
103+
// return `<iframe src="${url}" class="pdf" />`
104+
// }
102105

103106
return `<a href="${url}" class="internal">${displayText || link}</a>`
104107
} else if (tag) {
@@ -114,13 +117,16 @@ function ytLinkReplacement() {
114117
const embedUrl = toYouTubeEmbedURL(match[1])
115118
if (embedUrl) {
116119
return `
117-
<iframe
118-
class="external-embed youtube"
119-
allow="fullscreen"
120-
frameborder="0"
121-
src="${embedUrl}">
122-
</iframe>
123-
`
120+
<a href="${embedUrl}" class="external" target="_blank" > ${match[1]}</a>
121+
`
122+
// return `
123+
// <iframe
124+
// class="external-embed youtube"
125+
// allow="fullscreen"
126+
// frameborder="0"
127+
// src="${embedUrl}">
128+
// </iframe>
129+
// `
124130
}
125131
}
126132
return match[0]
@@ -189,7 +195,6 @@ export const Mindmap: QuartzTransformerPlugin<Partial<Options>> = (userOpts) =>
189195
})(root)
190196

191197
file.data.mindmap = root
192-
// file.data.mindmapOptions = transformOptions
193198
}
194199

195200
return [() => {

0 commit comments

Comments
 (0)