@brillout/docpress 0.16.36 → 0.16.37

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.
@@ -16,7 +16,10 @@ function remarkChoiceGroup() {
16
16
  const { choice } = meta.props
17
17
  node.meta = meta.rest
18
18
 
19
- if (choice) node.data ??= { customDataChoice: choice, customDataFilter: `code-${node.lang}` }
19
+ if (choice) {
20
+ const filter = ['jsx', 'tsx', 'vue'].includes(node.lang ?? '') ? 'code-component' : `code-${node.lang}`
21
+ node.data ??= { customDataChoice: choice, customDataFilter: filter }
22
+ }
20
23
  }
21
24
  if (node.type === 'containerDirective' && node.name === 'Choice') {
22
25
  if (!node.attributes) return
@@ -11,8 +11,10 @@ function remarkChoiceGroup() {
11
11
  const meta = parseMetaString(node.meta, ['choice']);
12
12
  const { choice } = meta.props;
13
13
  node.meta = meta.rest;
14
- if (choice)
15
- node.data ?? (node.data = { customDataChoice: choice, customDataFilter: `code-${node.lang}` });
14
+ if (choice) {
15
+ const filter = ['jsx', 'tsx', 'vue'].includes(node.lang ?? '') ? 'code-component' : `code-${node.lang}`;
16
+ node.data ?? (node.data = { customDataChoice: choice, customDataFilter: filter });
17
+ }
16
18
  }
17
19
  if (node.type === 'containerDirective' && node.name === 'Choice') {
18
20
  if (!node.attributes)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.16.36",
3
+ "version": "0.16.37",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@brillout/picocolors": "^1.0.10",