markdown-up 3.12.1 → 3.12.2
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/lib/scriptLibrary.js +13 -10
- package/package.json +2 -2
package/lib/scriptLibrary.js
CHANGED
|
@@ -863,14 +863,14 @@ function markdownElementsFn(args, options) {
|
|
|
863
863
|
const [markdownModel, generic] = valueArgsValidate(markdownElementsArgs, args);
|
|
864
864
|
|
|
865
865
|
// Create the markdown-model options
|
|
866
|
-
const markdownOptions = {
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
866
|
+
const markdownOptions = {'headerIds': true};
|
|
867
|
+
if (!generic) {
|
|
868
|
+
markdownOptions.urlFn = options.markdownOptions.urlFn;
|
|
869
|
+
markdownOptions.usedHeaderIds = options.markdownOptions.usedHeaderIds;
|
|
870
|
+
if ('copyFn' in options.markdownOptions) {
|
|
871
|
+
markdownOptions.copyFn = options.markdownOptions.copyFn;
|
|
872
|
+
}
|
|
872
873
|
}
|
|
873
|
-
|
|
874
874
|
return markdownElements(markdownModel, markdownOptions);
|
|
875
875
|
}
|
|
876
876
|
|
|
@@ -1044,13 +1044,16 @@ async function windowClipboardRead(args, options) {
|
|
|
1044
1044
|
// $group: Window
|
|
1045
1045
|
// $doc: Write text to the clipboard
|
|
1046
1046
|
// $arg text: The text to write
|
|
1047
|
+
// $arg type: The clipboard content type (default is "text/plain")
|
|
1047
1048
|
async function windowClipboardWrite(args, options) {
|
|
1048
|
-
const [text] = valueArgsValidate(windowClipboardWriteArgs, args);
|
|
1049
|
-
|
|
1049
|
+
const [text, type] = valueArgsValidate(windowClipboardWriteArgs, args);
|
|
1050
|
+
const blob = new Blob([text], {type});
|
|
1051
|
+
await options.window.navigator.clipboard.write([new options.window.ClipboardItem({[type]: blob})]);
|
|
1050
1052
|
}
|
|
1051
1053
|
|
|
1052
1054
|
const windowClipboardWriteArgs = valueArgsModel([
|
|
1053
|
-
{'name': 'text', 'type': 'string'}
|
|
1055
|
+
{'name': 'text', 'type': 'string'},
|
|
1056
|
+
{'name': 'type', 'type': 'string', 'default': 'text/plain'}
|
|
1054
1057
|
]);
|
|
1055
1058
|
|
|
1056
1059
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "markdown-up",
|
|
4
|
-
"version": "3.12.
|
|
4
|
+
"version": "3.12.2",
|
|
5
5
|
"description": "MarkdownUp is a Markdown viewer",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"markdown",
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
"c8": "~10.1",
|
|
32
32
|
"eslint": "~9.39",
|
|
33
33
|
"jsdoc": "~4.0",
|
|
34
|
-
"jsdom": "~27.
|
|
34
|
+
"jsdom": "~27.4"
|
|
35
35
|
}
|
|
36
36
|
}
|