@@ -54,7 +54,17 @@ const {
meta?: string;
}>();
-const showLineNumber = computed(() => meta?.includes('line-numbers'));
+const parsedMeta = computed(() => {
+ const split = meta?.split(' ') ?? [];
+ const params = new Map();
+
+ for (const param of split) {
+ const [key, val] = param.split('=');
+ params.set(key, val);
+ }
+
+ return params;
+});
const iconMap = new Map(Object.entries(useConfig().value.main.codeIcon));
const icon = computed(() => {
diff --git a/content/2.components/1.prose.md b/content/2.components/1.prose.md
index 0a31b4b3..27eab271 100644
--- a/content/2.components/1.prose.md
+++ b/content/2.components/1.prose.md
@@ -77,6 +77,20 @@ icon: lucide:letter-text
const line2 = 'This is line 2';
const line3 = 'This is line 3';
```
+
+ ```ts [Fixed Height] height=150
+ const parsedMeta = computed(() => {
+ const split = meta?.split(' ') ?? [];
+ const params = new Map();
+
+ for (const param of split) {
+ const [key, val] = param.split('=');
+ params.set(key, val);
+ }
+
+ return params;
+ });
+ ```
::
````md [Code]
@@ -103,7 +117,21 @@ icon: lucide:letter-text
const line2 = 'This is line 2';
const line3 = 'This is line 3';
```
- ````
+
+ ```ts [Fixed Height] height=150
+ const parsedMeta = computed(() => {
+ const split = meta?.split(' ') ?? [];
+ const params = new Map();
+
+ for (const param of split) {
+ const [key, val] = param.split('=');
+ params.set(key, val);
+ }
+
+ return params;
+ });
+ ```
+````
::
### Inline Code