mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(site): tabs (#144)
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user