Skip to content

Commit da5a746

Browse files
committed
feat(astro): preserve file path for imported file code blocks
1 parent bda1a31 commit da5a746

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/astro/src/remark/import-file.ts

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export function remarkImportFilePlugin(options: RemarkImportFilePluginOptions) {
4848

4949
if (content) {
5050
node.value = content;
51+
node.meta += ' path=' + node.lang;
5152
node.lang = path.extname(relativeFilePath).slice(1);
5253
}
5354
}

0 commit comments

Comments
 (0)