@dice-roller/vuepress-plugin-dice-roller 1.3.0-alpha.2 → 1.3.0-alpha.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dice-roller/vuepress-plugin-dice-roller",
3
- "version": "1.3.0-alpha.2",
3
+ "version": "1.3.0-alpha.3",
4
4
  "description": "Plugin for VuePress that allows rolling dice",
5
5
  "type": "module",
6
6
  "exports": {
@@ -35,7 +35,7 @@
35
35
  "vuepress": "2.0.0 || >=2.0.0-beta.51 <2.0.0-beta.50-pre"
36
36
  },
37
37
  "dependencies": {
38
- "@dice-roller/markdown-it-dice-roller": "^0.0.1-alpha.3",
38
+ "@dice-roller/markdown-it-dice-roller": "^0.0.1-alpha.4",
39
39
  "@dice-roller/vue": "^1.2.0",
40
40
  "markdown-it-container": "^3.0.0"
41
41
  },
@@ -3,40 +3,11 @@ import { Roll, Roller } from '@dice-roller/markdown-it-dice-roller';
3
3
 
4
4
  const __dirname = getDirname(import.meta.url);
5
5
 
6
- /* const render = (tokens, idx) => {
7
- const { nesting, info } = tokens[idx];
8
-
9
- if (nesting === 1) {
10
- // opening tag
11
- const [, notation] = info.trim().match(/roll\s+(.*?(?=\s*:::))/);
12
-
13
- return `<DiceRoller notation="${notation}"/>`;
14
- }
15
-
16
- // closing tag
17
- return '';
18
- };*/
19
- /* const render = (tokens, idx) => {
20
- const { nesting, info } = tokens[idx];
21
-
22
- if (nesting === 1) {
23
- // opening tag
24
- const [, notation] = info.trim().match(/^rolls?\s+(.*?)(:::)?$/s) ?? [];
25
- //const [, ...matches] = info.trim().match(/^rolls?\s+(.*?)(:::)?$/s) || [];
26
-
27
- return `<DiceRoller notation="${notation ?? ''}"/>`;
28
- }
29
-
30
- // closing tag
31
- return '';
32
- }; */
33
-
34
6
  export const diceRollerPlugin = (options = {}) => ({
35
7
  name: '@dice-roller/vuepress-plugin-dice-roller',
36
8
  clientConfigFile: path.resolve(__dirname, '../client/config.js'),
37
9
  extendsMarkdown: (md) => {
38
- //md.use(markdownItContainer, 'roll', { render });
39
- md.use(Roll, 'roll', options.rollOptions || {});
40
- md.use(Roller, 'roller', options.rollerOptions || {});
10
+ md.use(Roll, options.rollOptions || {});
11
+ md.use(Roller, options.rollerOptions || {});
41
12
  },
42
13
  });