markdown-up 3.2.0 → 3.2.1
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/script.js +4 -1
- package/package.json +1 -1
package/lib/script.js
CHANGED
|
@@ -274,7 +274,10 @@ export class MarkdownScriptRuntime {
|
|
|
274
274
|
// Helper method to finish the current Markdown block and add its elements
|
|
275
275
|
finishMarkdown() {
|
|
276
276
|
if (this.markdown !== null) {
|
|
277
|
-
const markdownOptions = {'headerIds': true, '
|
|
277
|
+
const markdownOptions = {'headerIds': true, 'urlFn': this.options.urlFn};
|
|
278
|
+
if (this.options.window.navigator.clipboard) {
|
|
279
|
+
markdownOptions.copyFn = (text) => this.options.window.navigator.clipboard.writeText(text);
|
|
280
|
+
}
|
|
278
281
|
try {
|
|
279
282
|
this.addElements(markdownElements(parseMarkdown(this.markdown), markdownOptions));
|
|
280
283
|
} catch {
|