md-editor-v3 5.6.0 → 5.6.1-0

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.
@@ -666,7 +666,7 @@ const codetabs = (md, _opts) => {
666
666
  <div class="${config.prefix}-code-action">
667
667
  <span class="${config.prefix}-code-lang">${tokens[idx].info.trim()}</span>
668
668
  <span class="${config.prefix}-copy-button" data-tips="${codeCodeText}"${isIcon ? " data-is-icon=true" : ""}>${copyBtnHtml}</span>
669
- ${_opts.extraTools || ""}
669
+ ${_opts.extraTools instanceof Function ? _opts.extraTools({ lang: tokens[idx].info.trim() }) : _opts.extraTools || ""}
670
670
  ${tagContainer2 === "details" ? collapseTips : ""}
671
671
  </div>
672
672
  </${tagHeader2}>
@@ -665,7 +665,7 @@ const codetabs = (md, _opts) => {
665
665
  <div class="${prefix}-code-action">
666
666
  <span class="${prefix}-code-lang">${tokens[idx].info.trim()}</span>
667
667
  <span class="${prefix}-copy-button" data-tips="${codeCodeText}"${isIcon ? " data-is-icon=true" : ""}>${copyBtnHtml}</span>
668
- ${_opts.extraTools || ""}
668
+ ${_opts.extraTools instanceof Function ? _opts.extraTools({ lang: tokens[idx].info.trim() }) : _opts.extraTools || ""}
669
669
  ${tagContainer2 === "details" ? collapseTips : ""}
670
670
  </div>
671
671
  </${tagHeader2}>
@@ -15,7 +15,9 @@ export interface CodeTabsPluginOps extends markdownit.Options {
15
15
  codeFoldable: boolean;
16
16
  autoFoldThreshold: number;
17
17
  customIconRef: ComputedRef<CustomIcon>;
18
- extraTools?: string;
18
+ extraTools?: string | (({ lang }: {
19
+ lang: string;
20
+ }) => string);
19
21
  }
20
22
  declare const codetabs: (md: markdownit, _opts: CodeTabsPluginOps) => void;
21
23
  export default codetabs;
package/lib/umd/index.js CHANGED
@@ -273,7 +273,7 @@ See: https://github.com/francoischalifour/medium-zoom`)}},S6=function(t){var n=d
273
273
  <div class="${X}-code-action">
274
274
  <span class="${X}-code-lang">${c[f].info.trim()}</span>
275
275
  <span class="${X}-copy-button" data-tips="${b}"${Q?" data-is-icon=true":""}>${g}</span>
276
- ${t.extraTools||""}
276
+ ${t.extraTools instanceof Function?t.extraTools({lang:c[f].info.trim()}):t.extraTools||""}
277
277
  ${D==="details"?S:""}
278
278
  </div>
279
279
  </${I}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md-editor-v3",
3
- "version": "5.6.0",
3
+ "version": "5.6.1-0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "vue",