@dice-roller/vuepress-plugin-dice-roller
Advanced tools
Comparing version 1.2.4 to 1.3.0-alpha.0
{ | ||
"name": "@dice-roller/vuepress-plugin-dice-roller", | ||
"version": "1.2.4", | ||
"version": "1.3.0-alpha.0", | ||
"description": "Plugin for VuePress that allows rolling dice", | ||
@@ -38,2 +38,3 @@ "type": "module", | ||
"dependencies": { | ||
"@dice-roller/markdown-it-dice-roller": "^0.0.1-alpha.1", | ||
"@dice-roller/vue": "^1.2.0", | ||
@@ -40,0 +41,0 @@ "markdown-it-container": "^3.0.0" |
import { getDirname, path } from '@vuepress/utils'; | ||
import markdownItContainer from 'markdown-it-container'; | ||
import { Roll, Roller } from '@dice-roller/markdown-it-dice-roller'; | ||
const __dirname = getDirname(import.meta.url); | ||
const render = (tokens, idx) => { | ||
/* const render = (tokens, idx) => { | ||
const { nesting, info } = tokens[idx]; | ||
@@ -18,4 +18,18 @@ | ||
return ''; | ||
}; | ||
};*/ | ||
/* const render = (tokens, idx) => { | ||
const { nesting, info } = tokens[idx]; | ||
if (nesting === 1) { | ||
// opening tag | ||
const [, notation] = info.trim().match(/^rolls?\s+(.*?)(:::)?$/s) ?? []; | ||
//const [, ...matches] = info.trim().match(/^rolls?\s+(.*?)(:::)?$/s) || []; | ||
return `<DiceRoller notation="${notation ?? ''}"/>`; | ||
} | ||
// closing tag | ||
return ''; | ||
}; */ | ||
export const diceRollerPlugin = () => ({ | ||
@@ -25,4 +39,6 @@ name: '@dice-roller/vuepress-plugin-dice-roller', | ||
extendsMarkdown: (md) => { | ||
md.use(markdownItContainer, 'roll', { render }); | ||
//md.use(markdownItContainer, 'roll', { render }); | ||
md.use(Roll, 'roll'); | ||
md.use(Roller, 'roller'); | ||
}, | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16374
207
4
1
+ Added@dice-roller/markdown-it-dice-roller@0.0.1-alpha.5(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedentities@3.0.1(transitive)
+ Addedlinkify-it@4.0.1(transitive)
+ Addedmarkdown-it@13.0.2(transitive)
+ Addedmdurl@1.0.1(transitive)
+ Addeduc.micro@1.0.6(transitive)