feat(site): tabs (#144)

This commit is contained in:
Darius Cepulis
2025-10-29 12:43:03 -05:00
committed by GitHub
parent 419911f2f2
commit df4692dbda
35 changed files with 999 additions and 304 deletions
+12
View File
@@ -0,0 +1,12 @@
const shikiTransformMetadata = {
pre(hast) {
// get stuff out of this.options.meta?.__raw;
// for now, let's start with just title="abc" or title='abc' or title=abc
const raw = this.options.meta?.__raw || '';
const titleMatch = raw.match(/title=(?:"([^"]+)"|'([^']+)'|([^\s"']+))/);
if (titleMatch) {
hast.properties.title = titleMatch[1] || titleMatch[2] || titleMatch[3];
}
},
};
export default shikiTransformMetadata;