@astrojs/markdown-remark 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/remark-shiki.d.ts +1 -1
- package/dist/remark-shiki.js +3 -3
- package/package.json +1 -1
- package/src/remark-shiki.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @astrojs/markdown-remark
|
|
2
2
|
|
|
3
|
+
## 0.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2628](https://github.com/withastro/astro/pull/2628) [`9b7e2ab2`](https://github.com/withastro/astro/commit/9b7e2ab2516cd36520364490df8e3482008292e3) Thanks [@JuanM04](https://github.com/JuanM04)! - Fixed shiki to work with `{ "type": "module" }`
|
|
8
|
+
|
|
3
9
|
## 0.6.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/remark-shiki.d.ts
CHANGED
package/dist/remark-shiki.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { getHighlighter } from "shiki";
|
|
2
2
|
import { visit } from "unist-util-visit";
|
|
3
3
|
const remarkShiki = async ({ langs = [], theme = "github-dark", wrap = false }) => {
|
|
4
|
-
const highlighter = await
|
|
4
|
+
const highlighter = await getHighlighter({ theme });
|
|
5
5
|
for (const lang of langs) {
|
|
6
6
|
await highlighter.loadLanguage(lang);
|
|
7
7
|
}
|
|
@@ -26,4 +26,4 @@ var remark_shiki_default = remarkShiki;
|
|
|
26
26
|
export {
|
|
27
27
|
remark_shiki_default as default
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL3JlbWFyay1zaGlraS50cyJdLAogICJtYXBwaW5ncyI6ICJBQUNBO0FBQ0E7QUE4QkEsTUFBTSxjQUFjLE9BQU8sRUFBRSxRQUFRLElBQUksUUFBUSxlQUFlLE9BQU8sWUFBeUI7QUFDL0YsUUFBTSxjQUFjLE1BQU0sZUFBZSxFQUFFO0FBRTNDLGFBQVcsUUFBUSxPQUFPO0FBQ3pCLFVBQU0sWUFBWSxhQUFhO0FBQUE7QUFHaEMsU0FBTyxNQUFNLENBQUMsU0FBYztBQUMzQixVQUFNLE1BQU0sUUFBUSxDQUFDLFNBQVM7QUF4Q2hDO0FBeUNHLFVBQUksT0FBTyxZQUFZLFdBQVcsS0FBSyxPQUFPLEVBQUUsTUFBTSxXQUFLLFNBQUwsWUFBYTtBQUduRSxhQUFPLEtBQUssUUFBUSxzQkFBc0I7QUFFMUMsYUFBTyxLQUFLLFFBQVEsOENBQThDO0FBR2xFLFVBQUksU0FBUyxPQUFPO0FBQ25CLGVBQU8sS0FBSyxRQUFRLGlCQUFpQjtBQUFBLGlCQUMzQixTQUFTLE1BQU07QUFDekIsZUFBTyxLQUFLLFFBQVEsaUJBQWlCO0FBQUE7QUFHdEMsV0FBSyxPQUFPO0FBQ1osV0FBSyxRQUFRO0FBQ2IsV0FBSyxXQUFXO0FBQUE7QUFBQTtBQUFBO0FBS25CLElBQU8sdUJBQVE7IiwKICAibmFtZXMiOiBbXQp9Cg==
|
package/package.json
CHANGED
package/src/remark-shiki.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import shiki from 'shiki';
|
|
1
|
+
import type * as shiki from 'shiki';
|
|
2
|
+
import { getHighlighter } from 'shiki';
|
|
2
3
|
import { visit } from 'unist-util-visit';
|
|
3
4
|
|
|
4
5
|
export interface ShikiConfig {
|
|
@@ -30,7 +31,7 @@ export interface ShikiConfig {
|
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
const remarkShiki = async ({ langs = [], theme = 'github-dark', wrap = false }: ShikiConfig) => {
|
|
33
|
-
const highlighter = await
|
|
34
|
+
const highlighter = await getHighlighter({ theme });
|
|
34
35
|
|
|
35
36
|
for (const lang of langs) {
|
|
36
37
|
await highlighter.loadLanguage(lang);
|