jodit-pro 4.13.37 → 4.13.43
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/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +26 -26
- package/es2015/jodit.js +90 -191
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +306 -168
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +29 -29
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.css +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +6 -12
- package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +16 -16
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +15 -15
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.css +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +17 -17
- package/es2021/jodit.js +9 -3
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +3 -3
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +204 -162
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +15 -15
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.css +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +2 -4
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +17 -17
- package/es2021.en/jodit.js +9 -3
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +3 -3
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +204 -162
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +15 -15
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.css +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +2 -4
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1795 -2702
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +406 -275
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +9 -9
- package/es5/plugins/backup/backup.min.js +2 -2
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +11 -18
- package/es5/plugins/button-generator/button-generator.min.js +2 -2
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +10 -17
- package/es5/plugins/color-picker/color-picker.min.js +2 -2
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +7 -7
- package/es5/plugins/emoji/emoji.min.js +2 -2
- package/es5/plugins/export-docs/export-docs.js +11 -11
- package/es5/plugins/export-docs/export-docs.min.js +2 -2
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +4 -10
- package/es5/plugins/finder/finder.min.css +1 -1
- package/es5/plugins/finder/finder.min.js +2 -2
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +14 -21
- package/es5/plugins/google-maps/google-maps.min.js +2 -2
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +6 -6
- package/es5/plugins/highlight-signature/highlight-signature.min.js +2 -2
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +6 -6
- package/es5/plugins/iframe-editor/iframe-editor.min.js +2 -2
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +29 -42
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +2 -2
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +6 -6
- package/es5/plugins/keyboard/keyboard.min.js +2 -2
- package/es5/plugins/mobile-view/mobile-view.js +6 -6
- package/es5/plugins/mobile-view/mobile-view.min.js +2 -2
- package/es5/plugins/page-break/page-break.js +6 -6
- package/es5/plugins/page-break/page-break.min.js +2 -2
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +13 -13
- package/es5/plugins/paste-code/paste-code.min.js +2 -2
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +8 -8
- package/es5/plugins/show-blocks/show-blocks.min.js +2 -2
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +18 -18
- package/es5/plugins/todo-list/todo-list.min.js +2 -2
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +7 -7
- package/es5/plugins/translate/translate.min.js +2 -2
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +7 -7
- package/es5/plugins/tune-block/tune-block.min.js +2 -2
- package/es5/polyfills.fat.min.js +2 -2
- package/es5/polyfills.js +225 -105
- package/es5/polyfills.min.js +2 -2
- package/esm/plugins/ai-assistant-pro/core/sanitize-utils.d.ts +18 -0
- package/esm/plugins/ai-assistant-pro/core/sanitize-utils.js +1 -0
- package/esm/plugins/ai-assistant-pro/tools/add-html/executor.js +1 -1
- package/esm/plugins/ai-assistant-pro/tools/replace-block/executor.js +1 -1
- package/esm/plugins/ai-assistant-pro/tools/replace-in-document/executor.js +1 -1
- package/package.json +1 -1
- package/types/plugins/ai-assistant-pro/core/sanitize-utils.d.ts +18 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.13.
|
|
4
|
+
* Version: v4.13.43
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -2072,6 +2072,39 @@ const TERMINAL_STATUSES = new Set([
|
|
|
2072
2072
|
}
|
|
2073
2073
|
|
|
2074
2074
|
|
|
2075
|
+
/***/ }),
|
|
2076
|
+
|
|
2077
|
+
/***/ 85696:
|
|
2078
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2079
|
+
|
|
2080
|
+
"use strict";
|
|
2081
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2082
|
+
/* harmony export */ createSanitizedContainer: function() { return /* binding */ createSanitizedContainer; },
|
|
2083
|
+
/* harmony export */ sanitizeElement: function() { return /* binding */ sanitizeElement; }
|
|
2084
|
+
/* harmony export */ });
|
|
2085
|
+
/*!
|
|
2086
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2087
|
+
* See LICENSE.md in the project root for license information.
|
|
2088
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2089
|
+
*/ /**
|
|
2090
|
+
* Parse an HTML string into a detached container passed through the
|
|
2091
|
+
* editor's synchronous `safeHTML` pipeline — the same contract
|
|
2092
|
+
* `Selection.insertNode` uses — so model-produced markup is sanitized
|
|
2093
|
+
* before it ever reaches the editor DOM.
|
|
2094
|
+
*/ function createSanitizedContainer(jodit, html) {
|
|
2095
|
+
const container = jodit.createInside.div();
|
|
2096
|
+
container.innerHTML = html;
|
|
2097
|
+
sanitizeElement(jodit, container);
|
|
2098
|
+
return container;
|
|
2099
|
+
}
|
|
2100
|
+
/**
|
|
2101
|
+
* Run the editor's synchronous `safeHTML` pipeline over a live element
|
|
2102
|
+
* whose content was modified directly (bypassing `Selection.insertNode`).
|
|
2103
|
+
*/ function sanitizeElement(jodit, element) {
|
|
2104
|
+
jodit.e.fire('safeHTML', element);
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
|
|
2075
2108
|
/***/ }),
|
|
2076
2109
|
|
|
2077
2110
|
/***/ 15927:
|
|
@@ -3835,7 +3868,8 @@ const requiresPermission = true;
|
|
|
3835
3868
|
/* harmony export */ });
|
|
3836
3869
|
/* harmony import */ var _core_abort_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
|
|
3837
3870
|
/* harmony import */ var _core_arg_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49459);
|
|
3838
|
-
/* harmony import */ var
|
|
3871
|
+
/* harmony import */ var _core_sanitize_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85696);
|
|
3872
|
+
/* harmony import */ var jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22732);
|
|
3839
3873
|
/*!
|
|
3840
3874
|
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
3841
3875
|
* See LICENSE.md in the project root for license information.
|
|
@@ -3843,6 +3877,7 @@ const requiresPermission = true;
|
|
|
3843
3877
|
*/
|
|
3844
3878
|
|
|
3845
3879
|
|
|
3880
|
+
|
|
3846
3881
|
/**
|
|
3847
3882
|
* Add HTML content to the beginning or end of the document
|
|
3848
3883
|
*/ async function execute(jodit, args, signal) {
|
|
@@ -3859,15 +3894,14 @@ const requiresPermission = true;
|
|
|
3859
3894
|
(0,_core_abort_utils__WEBPACK_IMPORTED_MODULE_0__.throwIfAborted)(signal);
|
|
3860
3895
|
try {
|
|
3861
3896
|
const fragment = jodit.createInside.fragment();
|
|
3862
|
-
const tmp =
|
|
3863
|
-
tmp.innerHTML = html;
|
|
3897
|
+
const tmp = (0,_core_sanitize_utils__WEBPACK_IMPORTED_MODULE_2__.createSanitizedContainer)(jodit, html);
|
|
3864
3898
|
while(tmp.firstChild){
|
|
3865
3899
|
fragment.appendChild(tmp.firstChild);
|
|
3866
3900
|
}
|
|
3867
3901
|
if (position === 'start') {
|
|
3868
|
-
|
|
3902
|
+
jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.prepend(jodit.editor, fragment);
|
|
3869
3903
|
} else {
|
|
3870
|
-
|
|
3904
|
+
jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.append(jodit.editor, fragment);
|
|
3871
3905
|
}
|
|
3872
3906
|
jodit.synchronizeValues();
|
|
3873
3907
|
return {
|
|
@@ -4626,7 +4660,8 @@ const requiresPermission = true;
|
|
|
4626
4660
|
/* harmony import */ var _core_abort_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
|
|
4627
4661
|
/* harmony import */ var _core_arg_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49459);
|
|
4628
4662
|
/* harmony import */ var _core_block_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44526);
|
|
4629
|
-
/* harmony import */ var
|
|
4663
|
+
/* harmony import */ var _core_sanitize_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(85696);
|
|
4664
|
+
/* harmony import */ var jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22732);
|
|
4630
4665
|
/*!
|
|
4631
4666
|
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
4632
4667
|
* See LICENSE.md in the project root for license information.
|
|
@@ -4635,6 +4670,7 @@ const requiresPermission = true;
|
|
|
4635
4670
|
|
|
4636
4671
|
|
|
4637
4672
|
|
|
4673
|
+
|
|
4638
4674
|
/**
|
|
4639
4675
|
* Replace a specific block in the document by its index or CSS selector
|
|
4640
4676
|
*/ async function execute(jodit, args, signal) {
|
|
@@ -4652,10 +4688,9 @@ const requiresPermission = true;
|
|
|
4652
4688
|
});
|
|
4653
4689
|
try {
|
|
4654
4690
|
// Create new element from HTML
|
|
4655
|
-
const tempDiv =
|
|
4656
|
-
tempDiv.innerHTML = html;
|
|
4691
|
+
const tempDiv = (0,_core_sanitize_utils__WEBPACK_IMPORTED_MODULE_3__.createSanitizedContainer)(jodit, html);
|
|
4657
4692
|
const newBlock = tempDiv.firstChild;
|
|
4658
|
-
if (!newBlock || !
|
|
4693
|
+
if (!newBlock || !jodit_esm_core_dom__WEBPACK_IMPORTED_MODULE_4__.Dom.isElement(newBlock)) {
|
|
4659
4694
|
throw new Error('Invalid HTML: must contain at least one element');
|
|
4660
4695
|
}
|
|
4661
4696
|
// Replace the block
|
|
@@ -4751,12 +4786,14 @@ const requiresPermission = true;
|
|
|
4751
4786
|
/* harmony export */ });
|
|
4752
4787
|
/* harmony import */ var _core_abort_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
|
|
4753
4788
|
/* harmony import */ var _core_arg_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49459);
|
|
4789
|
+
/* harmony import */ var _core_sanitize_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85696);
|
|
4754
4790
|
/*!
|
|
4755
4791
|
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
4756
4792
|
* See LICENSE.md in the project root for license information.
|
|
4757
4793
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
4758
4794
|
*/
|
|
4759
4795
|
|
|
4796
|
+
|
|
4760
4797
|
function replaceInSelectedElements(jodit, search, replace, useRegex, useSelector, signal) {
|
|
4761
4798
|
const elements = jodit.editor.querySelectorAll(useSelector);
|
|
4762
4799
|
if (elements.length === 0) {
|
|
@@ -4792,6 +4829,7 @@ function replaceInSelectedElements(jodit, search, replace, useRegex, useSelector
|
|
|
4792
4829
|
}
|
|
4793
4830
|
if (elementContent !== originalContent) {
|
|
4794
4831
|
element.innerHTML = elementContent;
|
|
4832
|
+
(0,_core_sanitize_utils__WEBPACK_IMPORTED_MODULE_2__.sanitizeElement)(jodit, element);
|
|
4795
4833
|
}
|
|
4796
4834
|
});
|
|
4797
4835
|
if (replacements > 0) {
|
|
@@ -8248,14 +8286,12 @@ function _define_property(obj, key, value) {
|
|
|
8248
8286
|
configurable: true,
|
|
8249
8287
|
writable: true
|
|
8250
8288
|
});
|
|
8251
|
-
} else
|
|
8252
|
-
obj[key] = value;
|
|
8253
|
-
}
|
|
8289
|
+
} else obj[key] = value;
|
|
8254
8290
|
return obj;
|
|
8255
8291
|
}
|
|
8256
8292
|
var _class;
|
|
8257
8293
|
/**
|
|
8258
|
-
* marked v17.0.
|
|
8294
|
+
* marked v17.0.6 - a markdown parser
|
|
8259
8295
|
* Copyright (c) 2018-2026, MarkedJS. (MIT License)
|
|
8260
8296
|
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
|
|
8261
8297
|
* https://github.com/markedjs/marked
|
|
@@ -8276,9 +8312,9 @@ var _class;
|
|
|
8276
8312
|
walkTokens: null
|
|
8277
8313
|
};
|
|
8278
8314
|
}
|
|
8279
|
-
var
|
|
8315
|
+
var O = M();
|
|
8280
8316
|
function G(u) {
|
|
8281
|
-
|
|
8317
|
+
O = u;
|
|
8282
8318
|
}
|
|
8283
8319
|
var _ = {
|
|
8284
8320
|
exec: ()=>null
|
|
@@ -8293,7 +8329,7 @@ function k(u, e = "") {
|
|
|
8293
8329
|
};
|
|
8294
8330
|
return n;
|
|
8295
8331
|
}
|
|
8296
|
-
var
|
|
8332
|
+
var be = (()=>{
|
|
8297
8333
|
try {
|
|
8298
8334
|
return !!new RegExp("(?<=1)(?<!1)");
|
|
8299
8335
|
} catch {
|
|
@@ -8356,98 +8392,98 @@ var Re = (()=>{
|
|
|
8356
8392
|
headingBeginRegex: (u)=>new RegExp(`^ {0,${Math.min(3, u - 1)}}#`),
|
|
8357
8393
|
htmlBeginRegex: (u)=>new RegExp(`^ {0,${Math.min(3, u - 1)}}<(?:[a-z].*>|!--)`, "i"),
|
|
8358
8394
|
blockquoteBeginRegex: (u)=>new RegExp(`^ {0,${Math.min(3, u - 1)}}>`)
|
|
8359
|
-
},
|
|
8360
|
-
blockquote:
|
|
8395
|
+
}, Re = /^(?:[ \t]*(?:\n|$))+/, Oe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Te = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, C = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, we = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Q = / {0,3}(?:[*+-]|\d{1,9}[.)])/, se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ie = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), ye = k(se).replace(/bull/g, Q).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), j = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Pe = /^[^\n]+/, F = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Se = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", F).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), $e = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Q).getRegex(), v = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", U = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, _e = k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", U).replace("tag", v).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oe = k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Le = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oe).getRegex(), K = {
|
|
8396
|
+
blockquote: Le,
|
|
8361
8397
|
code: Oe,
|
|
8362
|
-
def:
|
|
8363
|
-
fences:
|
|
8364
|
-
heading:
|
|
8365
|
-
hr:
|
|
8366
|
-
html:
|
|
8367
|
-
lheading:
|
|
8368
|
-
list:
|
|
8369
|
-
newline:
|
|
8370
|
-
paragraph:
|
|
8398
|
+
def: Se,
|
|
8399
|
+
fences: Te,
|
|
8400
|
+
heading: we,
|
|
8401
|
+
hr: C,
|
|
8402
|
+
html: _e,
|
|
8403
|
+
lheading: ie,
|
|
8404
|
+
list: $e,
|
|
8405
|
+
newline: Re,
|
|
8406
|
+
paragraph: oe,
|
|
8371
8407
|
table: _,
|
|
8372
|
-
text:
|
|
8373
|
-
},
|
|
8374
|
-
...
|
|
8375
|
-
lheading:
|
|
8376
|
-
table:
|
|
8377
|
-
paragraph: k(
|
|
8378
|
-
},
|
|
8379
|
-
...
|
|
8380
|
-
html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",
|
|
8408
|
+
text: Pe
|
|
8409
|
+
}, ne = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex(), Me = {
|
|
8410
|
+
...K,
|
|
8411
|
+
lheading: ye,
|
|
8412
|
+
table: ne,
|
|
8413
|
+
paragraph: k(j).replace("hr", C).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ne).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", v).getRegex()
|
|
8414
|
+
}, ze = {
|
|
8415
|
+
...K,
|
|
8416
|
+
html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", U).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
8381
8417
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
8382
8418
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
8383
8419
|
fences: _,
|
|
8384
8420
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
8385
|
-
paragraph: k(
|
|
8386
|
-
]`).replace("lheading",
|
|
8387
|
-
},
|
|
8421
|
+
paragraph: k(j).replace("hr", C).replace("heading", ` *#{1,6} *[^
|
|
8422
|
+
]`).replace("lheading", ie).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
8423
|
+
}, Ee = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ie = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ae = /^( {2,}|\\)\n(?!\s*$)/, Ae = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, z = /[\p{P}\p{S}]/u, H = /[\s\p{P}\p{S}]/u, W = /[^\s\p{P}\p{S}]/u, Ce = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H).getRegex(), le = /(?!~)[\p{P}\p{S}]/u, Be = /(?!~)[\s\p{P}\p{S}]/u, De = /(?:[^\s\p{P}\p{S}]|~)/u, qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", be ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ue = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ve = k(ue, "u").replace(/punct/g, z).getRegex(), He = k(ue, "u").replace(/punct/g, le).getRegex(), pe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ze = k(pe, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Ge = k(pe, "gu").replace(/notPunctSpace/g, De).replace(/punctSpace/g, Be).replace(/punct/g, le).getRegex(), Ne = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Qe = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, z).getRegex(), je = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Fe = k(je, "gu").replace(/notPunctSpace/g, W).replace(/punctSpace/g, H).replace(/punct/g, z).getRegex(), Ue = k(/\\(punct)/, "gu").replace(/punct/g, z).getRegex(), Ke = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), We = k(U).replace("(?:-->|$)", "-->").getRegex(), Xe = k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", We).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), q = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Je = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", q).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ce = k(/^!?\[(label)\]\[(ref)\]/).replace("label", q).replace("ref", F).getRegex(), he = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", F).getRegex(), Ve = k("reflink|nolink(?!\\()", "g").replace("reflink", ce).replace("nolink", he).getRegex(), re = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, X = {
|
|
8388
8424
|
_backpedal: _,
|
|
8389
|
-
anyPunctuation:
|
|
8390
|
-
autolink:
|
|
8391
|
-
blockSkip:
|
|
8392
|
-
br:
|
|
8393
|
-
code:
|
|
8425
|
+
anyPunctuation: Ue,
|
|
8426
|
+
autolink: Ke,
|
|
8427
|
+
blockSkip: qe,
|
|
8428
|
+
br: ae,
|
|
8429
|
+
code: Ie,
|
|
8394
8430
|
del: _,
|
|
8395
8431
|
delLDelim: _,
|
|
8396
8432
|
delRDelim: _,
|
|
8397
|
-
emStrongLDelim:
|
|
8398
|
-
emStrongRDelimAst:
|
|
8399
|
-
emStrongRDelimUnd:
|
|
8400
|
-
escape:
|
|
8401
|
-
link:
|
|
8402
|
-
nolink:
|
|
8403
|
-
punctuation:
|
|
8404
|
-
reflink:
|
|
8405
|
-
reflinkSearch:
|
|
8406
|
-
tag:
|
|
8407
|
-
text:
|
|
8433
|
+
emStrongLDelim: ve,
|
|
8434
|
+
emStrongRDelimAst: Ze,
|
|
8435
|
+
emStrongRDelimUnd: Ne,
|
|
8436
|
+
escape: Ee,
|
|
8437
|
+
link: Je,
|
|
8438
|
+
nolink: he,
|
|
8439
|
+
punctuation: Ce,
|
|
8440
|
+
reflink: ce,
|
|
8441
|
+
reflinkSearch: Ve,
|
|
8442
|
+
tag: Xe,
|
|
8443
|
+
text: Ae,
|
|
8408
8444
|
url: _
|
|
8409
|
-
},
|
|
8410
|
-
...
|
|
8411
|
-
link: k(/^!?\[(label)\]\((.*?)\)/).replace("label",
|
|
8412
|
-
reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",
|
|
8413
|
-
},
|
|
8414
|
-
...
|
|
8415
|
-
emStrongRDelimAst:
|
|
8416
|
-
emStrongLDelim:
|
|
8417
|
-
delLDelim:
|
|
8418
|
-
delRDelim:
|
|
8419
|
-
url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",
|
|
8445
|
+
}, Ye = {
|
|
8446
|
+
...X,
|
|
8447
|
+
link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", q).getRegex(),
|
|
8448
|
+
reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", q).getRegex()
|
|
8449
|
+
}, N = {
|
|
8450
|
+
...X,
|
|
8451
|
+
emStrongRDelimAst: Ge,
|
|
8452
|
+
emStrongLDelim: He,
|
|
8453
|
+
delLDelim: Qe,
|
|
8454
|
+
delRDelim: Fe,
|
|
8455
|
+
url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", re).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
8420
8456
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
8421
8457
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
8422
|
-
text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",
|
|
8423
|
-
},
|
|
8424
|
-
...
|
|
8425
|
-
br: k(
|
|
8426
|
-
text: k(
|
|
8427
|
-
},
|
|
8428
|
-
normal:
|
|
8429
|
-
gfm:
|
|
8430
|
-
pedantic:
|
|
8431
|
-
},
|
|
8432
|
-
normal:
|
|
8433
|
-
gfm:
|
|
8434
|
-
breaks:
|
|
8435
|
-
pedantic:
|
|
8458
|
+
text: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", re).getRegex()
|
|
8459
|
+
}, et = {
|
|
8460
|
+
...N,
|
|
8461
|
+
br: k(ae).replace("{2,}", "*").getRegex(),
|
|
8462
|
+
text: k(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
8463
|
+
}, B = {
|
|
8464
|
+
normal: K,
|
|
8465
|
+
gfm: Me,
|
|
8466
|
+
pedantic: ze
|
|
8467
|
+
}, E = {
|
|
8468
|
+
normal: X,
|
|
8469
|
+
gfm: N,
|
|
8470
|
+
breaks: et,
|
|
8471
|
+
pedantic: Ye
|
|
8436
8472
|
};
|
|
8437
|
-
var
|
|
8473
|
+
var tt = {
|
|
8438
8474
|
"&": "&",
|
|
8439
8475
|
"<": "<",
|
|
8440
8476
|
">": ">",
|
|
8441
8477
|
'"': """,
|
|
8442
8478
|
"'": "'"
|
|
8443
|
-
},
|
|
8444
|
-
function
|
|
8479
|
+
}, ke = (u)=>tt[u];
|
|
8480
|
+
function T(u, e) {
|
|
8445
8481
|
if (e) {
|
|
8446
|
-
if (m.escapeTest.test(u)) return u.replace(m.escapeReplace,
|
|
8447
|
-
} else if (m.escapeTestNoEncode.test(u)) return u.replace(m.escapeReplaceNoEncode,
|
|
8482
|
+
if (m.escapeTest.test(u)) return u.replace(m.escapeReplace, ke);
|
|
8483
|
+
} else if (m.escapeTestNoEncode.test(u)) return u.replace(m.escapeReplaceNoEncode, ke);
|
|
8448
8484
|
return u;
|
|
8449
8485
|
}
|
|
8450
|
-
function
|
|
8486
|
+
function J(u) {
|
|
8451
8487
|
try {
|
|
8452
8488
|
u = encodeURI(u).replace(m.percentDecode, "%");
|
|
8453
8489
|
} catch {
|
|
@@ -8455,7 +8491,7 @@ function X(u) {
|
|
|
8455
8491
|
}
|
|
8456
8492
|
return u;
|
|
8457
8493
|
}
|
|
8458
|
-
function
|
|
8494
|
+
function V(u, e) {
|
|
8459
8495
|
let t = u.replace(m.findPipe, (i, s, a)=>{
|
|
8460
8496
|
let o = !1, l = s;
|
|
8461
8497
|
for(; --l >= 0 && a[l] === "\\";)o = !o;
|
|
@@ -8466,7 +8502,7 @@ function J(u, e) {
|
|
|
8466
8502
|
for(; r < n.length; r++)n[r] = n[r].trim().replace(m.slashPipe, "|");
|
|
8467
8503
|
return n;
|
|
8468
8504
|
}
|
|
8469
|
-
function
|
|
8505
|
+
function I(u, e, t) {
|
|
8470
8506
|
let n = u.length;
|
|
8471
8507
|
if (n === 0) return "";
|
|
8472
8508
|
let r = 0;
|
|
@@ -8478,7 +8514,7 @@ function E(u, e, t) {
|
|
|
8478
8514
|
}
|
|
8479
8515
|
return u.slice(0, n - r);
|
|
8480
8516
|
}
|
|
8481
|
-
function
|
|
8517
|
+
function de(u, e) {
|
|
8482
8518
|
if (u.indexOf(e[1]) === -1) return -1;
|
|
8483
8519
|
let t = 0;
|
|
8484
8520
|
for(let n = 0; n < u.length; n++)if (u[n] === "\\") n++;
|
|
@@ -8486,7 +8522,7 @@ function ge(u, e) {
|
|
|
8486
8522
|
else if (u[n] === e[1] && (t--, t < 0)) return n;
|
|
8487
8523
|
return t > 0 ? -2 : -1;
|
|
8488
8524
|
}
|
|
8489
|
-
function
|
|
8525
|
+
function ge(u, e = 0) {
|
|
8490
8526
|
let t = e, n = "";
|
|
8491
8527
|
for (let r of u)if (r === " ") {
|
|
8492
8528
|
let i = 4 - t % 4;
|
|
@@ -8494,7 +8530,7 @@ function fe(u, e = 0) {
|
|
|
8494
8530
|
} else n += r, t++;
|
|
8495
8531
|
return n;
|
|
8496
8532
|
}
|
|
8497
|
-
function
|
|
8533
|
+
function fe(u, e, t, n, r) {
|
|
8498
8534
|
let i = e.href, s = e.title || null, a = u[1].replace(r.other.outputLinkReplace, "$1");
|
|
8499
8535
|
n.state.inLink = !0;
|
|
8500
8536
|
let o = {
|
|
@@ -8507,7 +8543,7 @@ function me(u, e, t, n, r) {
|
|
|
8507
8543
|
};
|
|
8508
8544
|
return n.state.inLink = !1, o;
|
|
8509
8545
|
}
|
|
8510
|
-
function
|
|
8546
|
+
function nt(u, e, t) {
|
|
8511
8547
|
let n = u.match(t.other.indentCodeCompensation);
|
|
8512
8548
|
if (n === null) return e;
|
|
8513
8549
|
let r = n[1];
|
|
@@ -8536,7 +8572,7 @@ var w = class {
|
|
|
8536
8572
|
type: "code",
|
|
8537
8573
|
raw: t[0],
|
|
8538
8574
|
codeBlockStyle: "indented",
|
|
8539
|
-
text: this.options.pedantic ? n :
|
|
8575
|
+
text: this.options.pedantic ? n : I(n, `
|
|
8540
8576
|
`)
|
|
8541
8577
|
};
|
|
8542
8578
|
}
|
|
@@ -8544,7 +8580,7 @@ var w = class {
|
|
|
8544
8580
|
fences(e) {
|
|
8545
8581
|
let t = this.rules.block.fences.exec(e);
|
|
8546
8582
|
if (t) {
|
|
8547
|
-
let n = t[0], r =
|
|
8583
|
+
let n = t[0], r = nt(n, t[3] || "", this.rules);
|
|
8548
8584
|
return {
|
|
8549
8585
|
type: "code",
|
|
8550
8586
|
raw: n,
|
|
@@ -8558,7 +8594,7 @@ var w = class {
|
|
|
8558
8594
|
if (t) {
|
|
8559
8595
|
let n = t[2].trim();
|
|
8560
8596
|
if (this.rules.other.endingHash.test(n)) {
|
|
8561
|
-
let r =
|
|
8597
|
+
let r = I(n, "#");
|
|
8562
8598
|
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
8563
8599
|
}
|
|
8564
8600
|
return {
|
|
@@ -8574,14 +8610,14 @@ var w = class {
|
|
|
8574
8610
|
let t = this.rules.block.hr.exec(e);
|
|
8575
8611
|
if (t) return {
|
|
8576
8612
|
type: "hr",
|
|
8577
|
-
raw:
|
|
8613
|
+
raw: I(t[0], `
|
|
8578
8614
|
`)
|
|
8579
8615
|
};
|
|
8580
8616
|
}
|
|
8581
8617
|
blockquote(e) {
|
|
8582
8618
|
let t = this.rules.block.blockquote.exec(e);
|
|
8583
8619
|
if (t) {
|
|
8584
|
-
let n =
|
|
8620
|
+
let n = I(t[0], `
|
|
8585
8621
|
`).split(`
|
|
8586
8622
|
`), r = "", i = "", s = [];
|
|
8587
8623
|
for(; n.length > 0;){
|
|
@@ -8640,25 +8676,25 @@ ${c}` : c;
|
|
|
8640
8676
|
let l = !1, p = "", c = "";
|
|
8641
8677
|
if (!(t = s.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
8642
8678
|
p = t[0], e = e.substring(p.length);
|
|
8643
|
-
let d =
|
|
8679
|
+
let d = ge(t[2].split(`
|
|
8644
8680
|
`, 1)[0], t[1].length), h = e.split(`
|
|
8645
8681
|
`, 1)[0], R = !d.trim(), f = 0;
|
|
8646
8682
|
if (this.options.pedantic ? (f = 2, c = d.trimStart()) : R ? f = t[1].length + 1 : (f = d.search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, c = d.slice(f), f += t[1].length), R && this.rules.other.blankLine.test(h) && (p += h + `
|
|
8647
8683
|
`, e = e.substring(h.length + 1), l = !0), !l) {
|
|
8648
|
-
let S = this.rules.other.nextBulletRegex(f),
|
|
8684
|
+
let S = this.rules.other.nextBulletRegex(f), Y = this.rules.other.hrRegex(f), ee = this.rules.other.fencesBeginRegex(f), te = this.rules.other.headingBeginRegex(f), me = this.rules.other.htmlBeginRegex(f), xe = this.rules.other.blockquoteBeginRegex(f);
|
|
8649
8685
|
for(; e;){
|
|
8650
|
-
let
|
|
8651
|
-
`, 1)[0],
|
|
8652
|
-
if (h =
|
|
8653
|
-
if (
|
|
8654
|
-
` +
|
|
8686
|
+
let Z = e.split(`
|
|
8687
|
+
`, 1)[0], A;
|
|
8688
|
+
if (h = Z, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), A = h) : A = h.replace(this.rules.other.tabCharGlobal, " "), ee.test(h) || te.test(h) || me.test(h) || xe.test(h) || S.test(h) || Y.test(h)) break;
|
|
8689
|
+
if (A.search(this.rules.other.nonSpaceChar) >= f || !h.trim()) c += `
|
|
8690
|
+
` + A.slice(f);
|
|
8655
8691
|
else {
|
|
8656
|
-
if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 ||
|
|
8692
|
+
if (R || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ee.test(d) || te.test(d) || Y.test(d)) break;
|
|
8657
8693
|
c += `
|
|
8658
8694
|
` + h;
|
|
8659
8695
|
}
|
|
8660
|
-
R = !h.trim(), p +=
|
|
8661
|
-
`, e = e.substring(
|
|
8696
|
+
R = !h.trim(), p += Z + `
|
|
8697
|
+
`, e = e.substring(Z.length + 1), d = A.slice(f);
|
|
8662
8698
|
}
|
|
8663
8699
|
}
|
|
8664
8700
|
i.loose || (a ? i.loose = !0 : this.rules.other.doubleBlankLine.test(p) && (a = !0)), i.items.push({
|
|
@@ -8741,7 +8777,7 @@ ${c}` : c;
|
|
|
8741
8777
|
table(e) {
|
|
8742
8778
|
let t = this.rules.block.table.exec(e);
|
|
8743
8779
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
8744
|
-
let n =
|
|
8780
|
+
let n = V(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
8745
8781
|
`) : [], s = {
|
|
8746
8782
|
type: "table",
|
|
8747
8783
|
raw: t[0],
|
|
@@ -8757,7 +8793,7 @@ ${c}` : c;
|
|
|
8757
8793
|
header: !0,
|
|
8758
8794
|
align: s.align[a]
|
|
8759
8795
|
});
|
|
8760
|
-
for (let a of i)s.rows.push(
|
|
8796
|
+
for (let a of i)s.rows.push(V(a, s.header.length).map((o, l)=>({
|
|
8761
8797
|
text: o,
|
|
8762
8798
|
tokens: this.lexer.inline(o),
|
|
8763
8799
|
header: !1,
|
|
@@ -8768,13 +8804,16 @@ ${c}` : c;
|
|
|
8768
8804
|
}
|
|
8769
8805
|
lheading(e) {
|
|
8770
8806
|
let t = this.rules.block.lheading.exec(e);
|
|
8771
|
-
if (t)
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8807
|
+
if (t) {
|
|
8808
|
+
let n = t[1].trim();
|
|
8809
|
+
return {
|
|
8810
|
+
type: "heading",
|
|
8811
|
+
raw: t[0],
|
|
8812
|
+
depth: t[2].charAt(0) === "=" ? 1 : 2,
|
|
8813
|
+
text: n,
|
|
8814
|
+
tokens: this.lexer.inline(n)
|
|
8815
|
+
};
|
|
8816
|
+
}
|
|
8778
8817
|
}
|
|
8779
8818
|
paragraph(e) {
|
|
8780
8819
|
let t = this.rules.block.paragraph.exec(e);
|
|
@@ -8823,10 +8862,10 @@ ${c}` : c;
|
|
|
8823
8862
|
let n = t[2].trim();
|
|
8824
8863
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
8825
8864
|
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
8826
|
-
let s =
|
|
8865
|
+
let s = I(n.slice(0, -1), "\\");
|
|
8827
8866
|
if ((n.length - s.length) % 2 === 0) return;
|
|
8828
8867
|
} else {
|
|
8829
|
-
let s =
|
|
8868
|
+
let s = de(t[2], "()");
|
|
8830
8869
|
if (s === -2) return;
|
|
8831
8870
|
if (s > -1) {
|
|
8832
8871
|
let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
|
|
@@ -8838,7 +8877,7 @@ ${c}` : c;
|
|
|
8838
8877
|
let s = this.rules.other.pedanticHrefTitle.exec(r);
|
|
8839
8878
|
s && (r = s[1], i = s[3]);
|
|
8840
8879
|
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
8841
|
-
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)),
|
|
8880
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), fe(t, {
|
|
8842
8881
|
href: r && r.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
8843
8882
|
title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
|
|
8844
8883
|
}, t[0], this.lexer, this.rules);
|
|
@@ -8856,17 +8895,17 @@ ${c}` : c;
|
|
|
8856
8895
|
text: s
|
|
8857
8896
|
};
|
|
8858
8897
|
}
|
|
8859
|
-
return
|
|
8898
|
+
return fe(n, i, n[0], this.lexer, this.rules);
|
|
8860
8899
|
}
|
|
8861
8900
|
}
|
|
8862
8901
|
emStrong(e, t, n = "") {
|
|
8863
8902
|
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
8864
|
-
if (!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
8865
|
-
if (!(r[1] || r[
|
|
8903
|
+
if (!r || !r[1] && !r[2] && !r[3] && !r[4] || r[4] && n.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
8904
|
+
if (!(r[1] || r[3] || "") || !n || this.rules.inline.punctuation.exec(n)) {
|
|
8866
8905
|
let s = [
|
|
8867
8906
|
...r[0]
|
|
8868
8907
|
].length - 1, a, o, l = s, p = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
8869
|
-
for(c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t))
|
|
8908
|
+
for(c.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = c.exec(t)) !== null;){
|
|
8870
8909
|
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a) continue;
|
|
8871
8910
|
if (o = [
|
|
8872
8911
|
...a
|
|
@@ -8926,7 +8965,7 @@ ${c}` : c;
|
|
|
8926
8965
|
let s = [
|
|
8927
8966
|
...r[0]
|
|
8928
8967
|
].length - 1, a, o, l = s, p = this.rules.inline.delRDelim;
|
|
8929
|
-
for(p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t))
|
|
8968
|
+
for(p.lastIndex = 0, t = t.slice(-1 * e.length + s); (r = p.exec(t)) !== null;){
|
|
8930
8969
|
if (a = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !a || (o = [
|
|
8931
8970
|
...a
|
|
8932
8971
|
].length, o !== s)) continue;
|
|
@@ -9009,14 +9048,14 @@ ${c}` : c;
|
|
|
9009
9048
|
_define_property(this, "options", void 0);
|
|
9010
9049
|
_define_property(this, "rules", void 0);
|
|
9011
9050
|
_define_property(this, "lexer", void 0);
|
|
9012
|
-
this.options = e ||
|
|
9051
|
+
this.options = e || O;
|
|
9013
9052
|
}
|
|
9014
9053
|
};
|
|
9015
9054
|
var x = class u {
|
|
9016
9055
|
static get rules() {
|
|
9017
9056
|
return {
|
|
9018
|
-
block:
|
|
9019
|
-
inline:
|
|
9057
|
+
block: B,
|
|
9058
|
+
inline: E
|
|
9020
9059
|
};
|
|
9021
9060
|
}
|
|
9022
9061
|
static lex(e, t) {
|
|
@@ -9035,7 +9074,7 @@ var x = class u {
|
|
|
9035
9074
|
return this.inlineQueue = [], this.tokens;
|
|
9036
9075
|
}
|
|
9037
9076
|
blockTokens(e, t = [], n = !1) {
|
|
9038
|
-
for(this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e;){
|
|
9077
|
+
for(this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(m.tabCharGlobal, " ").replace(m.spaceLine, "")); e;){
|
|
9039
9078
|
let r;
|
|
9040
9079
|
if (this.options.extensions?.block?.some((s)=>(r = s.call({
|
|
9041
9080
|
lexer: this
|
|
@@ -9143,14 +9182,15 @@ var x = class u {
|
|
|
9143
9182
|
}), t;
|
|
9144
9183
|
}
|
|
9145
9184
|
inlineTokens(e, t = []) {
|
|
9185
|
+
this.tokenizer.lexer = this;
|
|
9146
9186
|
let n = e, r = null;
|
|
9147
9187
|
if (this.tokens.links) {
|
|
9148
9188
|
let o = Object.keys(this.tokens.links);
|
|
9149
|
-
if (o.length > 0) for(; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n))
|
|
9189
|
+
if (o.length > 0) for(; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) !== null;)o.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
9150
9190
|
}
|
|
9151
|
-
for(; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n))
|
|
9191
|
+
for(; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) !== null;)n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
9152
9192
|
let i;
|
|
9153
|
-
for(; (r = this.tokenizer.rules.inline.blockSkip.exec(n))
|
|
9193
|
+
for(; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) !== null;)i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
9154
9194
|
n = this.options.hooks?.emStrongMask?.call({
|
|
9155
9195
|
lexer: this
|
|
9156
9196
|
}, n) ?? n;
|
|
@@ -9234,17 +9274,17 @@ var x = class u {
|
|
|
9234
9274
|
_define_property(this, "state", void 0);
|
|
9235
9275
|
_define_property(this, "inlineQueue", void 0);
|
|
9236
9276
|
_define_property(this, "tokenizer", void 0);
|
|
9237
|
-
this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
9277
|
+
this.tokens = [], this.tokens.links = Object.create(null), this.options = e || O, this.options.tokenizer = this.options.tokenizer || new w, this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
9238
9278
|
inLink: !1,
|
|
9239
9279
|
inRawBlock: !1,
|
|
9240
9280
|
top: !0
|
|
9241
9281
|
};
|
|
9242
9282
|
let t = {
|
|
9243
9283
|
other: m,
|
|
9244
|
-
block:
|
|
9245
|
-
inline:
|
|
9284
|
+
block: B.normal,
|
|
9285
|
+
inline: E.normal
|
|
9246
9286
|
};
|
|
9247
|
-
this.options.pedantic ? (t.block =
|
|
9287
|
+
this.options.pedantic ? (t.block = B.pedantic, t.inline = E.pedantic) : this.options.gfm && (t.block = B.gfm, this.options.breaks ? t.inline = E.breaks : t.inline = E.gfm), this.tokenizer.rules = t;
|
|
9248
9288
|
}
|
|
9249
9289
|
};
|
|
9250
9290
|
var y = class {
|
|
@@ -9254,8 +9294,8 @@ var y = class {
|
|
|
9254
9294
|
code({ text: e, lang: t, escaped: n }) {
|
|
9255
9295
|
let r = (t || "").match(m.notSpaceStart)?.[0], i = e.replace(m.endingNewline, "") + `
|
|
9256
9296
|
`;
|
|
9257
|
-
return r ? '<pre><code class="language-' +
|
|
9258
|
-
` : "<pre><code>" + (n ? i :
|
|
9297
|
+
return r ? '<pre><code class="language-' + T(r) + '">' + (n ? i : T(i, !0)) + `</code></pre>
|
|
9298
|
+
` : "<pre><code>" + (n ? i : T(i, !0)) + `</code></pre>
|
|
9259
9299
|
`;
|
|
9260
9300
|
}
|
|
9261
9301
|
blockquote({ tokens: e }) {
|
|
@@ -9337,7 +9377,7 @@ ${e}</tr>
|
|
|
9337
9377
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
9338
9378
|
}
|
|
9339
9379
|
codespan({ text: e }) {
|
|
9340
|
-
return `<code>${
|
|
9380
|
+
return `<code>${T(e, !0)}</code>`;
|
|
9341
9381
|
}
|
|
9342
9382
|
br(e) {
|
|
9343
9383
|
return "<br>";
|
|
@@ -9346,27 +9386,27 @@ ${e}</tr>
|
|
|
9346
9386
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
9347
9387
|
}
|
|
9348
9388
|
link({ href: e, title: t, tokens: n }) {
|
|
9349
|
-
let r = this.parser.parseInline(n), i =
|
|
9389
|
+
let r = this.parser.parseInline(n), i = J(e);
|
|
9350
9390
|
if (i === null) return r;
|
|
9351
9391
|
e = i;
|
|
9352
9392
|
let s = '<a href="' + e + '"';
|
|
9353
|
-
return t && (s += ' title="' +
|
|
9393
|
+
return t && (s += ' title="' + T(t) + '"'), s += ">" + r + "</a>", s;
|
|
9354
9394
|
}
|
|
9355
9395
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
9356
9396
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
9357
|
-
let i =
|
|
9358
|
-
if (i === null) return
|
|
9397
|
+
let i = J(e);
|
|
9398
|
+
if (i === null) return T(n);
|
|
9359
9399
|
e = i;
|
|
9360
|
-
let s = `<img src="${e}" alt="${
|
|
9361
|
-
return t && (s += ` title="${
|
|
9400
|
+
let s = `<img src="${e}" alt="${T(n)}"`;
|
|
9401
|
+
return t && (s += ` title="${T(t)}"`), s += ">", s;
|
|
9362
9402
|
}
|
|
9363
9403
|
text(e) {
|
|
9364
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
9404
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : T(e.text);
|
|
9365
9405
|
}
|
|
9366
9406
|
constructor(e){
|
|
9367
9407
|
_define_property(this, "options", void 0);
|
|
9368
9408
|
_define_property(this, "parser", void 0);
|
|
9369
|
-
this.options = e ||
|
|
9409
|
+
this.options = e || O;
|
|
9370
9410
|
}
|
|
9371
9411
|
};
|
|
9372
9412
|
var $ = class {
|
|
@@ -9409,6 +9449,7 @@ var b = class u {
|
|
|
9409
9449
|
return new u(t).parseInline(e);
|
|
9410
9450
|
}
|
|
9411
9451
|
parse(e) {
|
|
9452
|
+
this.renderer.parser = this;
|
|
9412
9453
|
let t = "";
|
|
9413
9454
|
for(let n = 0; n < e.length; n++){
|
|
9414
9455
|
let r = e[n];
|
|
@@ -9506,6 +9547,7 @@ var b = class u {
|
|
|
9506
9547
|
return t;
|
|
9507
9548
|
}
|
|
9508
9549
|
parseInline(e, t = this.renderer) {
|
|
9550
|
+
this.renderer.parser = this;
|
|
9509
9551
|
let n = "";
|
|
9510
9552
|
for(let r = 0; r < e.length; r++){
|
|
9511
9553
|
let i = e[r];
|
|
@@ -9600,7 +9642,7 @@ var b = class u {
|
|
|
9600
9642
|
_define_property(this, "options", void 0);
|
|
9601
9643
|
_define_property(this, "renderer", void 0);
|
|
9602
9644
|
_define_property(this, "textRenderer", void 0);
|
|
9603
|
-
this.options = e ||
|
|
9645
|
+
this.options = e || O, this.options.renderer = this.options.renderer || new y, this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new $;
|
|
9604
9646
|
}
|
|
9605
9647
|
};
|
|
9606
9648
|
var P = (_class = class {
|
|
@@ -9616,16 +9658,16 @@ var P = (_class = class {
|
|
|
9616
9658
|
emStrongMask(e) {
|
|
9617
9659
|
return e;
|
|
9618
9660
|
}
|
|
9619
|
-
provideLexer() {
|
|
9620
|
-
return
|
|
9661
|
+
provideLexer(e = this.block) {
|
|
9662
|
+
return e ? x.lex : x.lexInline;
|
|
9621
9663
|
}
|
|
9622
|
-
provideParser() {
|
|
9623
|
-
return
|
|
9664
|
+
provideParser(e = this.block) {
|
|
9665
|
+
return e ? b.parse : b.parseInline;
|
|
9624
9666
|
}
|
|
9625
9667
|
constructor(e){
|
|
9626
9668
|
_define_property(this, "options", void 0);
|
|
9627
9669
|
_define_property(this, "block", void 0);
|
|
9628
|
-
this.options = e ||
|
|
9670
|
+
this.options = e || O;
|
|
9629
9671
|
}
|
|
9630
9672
|
}, _define_property(_class, "passThroughHooks", new Set([
|
|
9631
9673
|
"preprocess",
|
|
@@ -9637,7 +9679,7 @@ var P = (_class = class {
|
|
|
9637
9679
|
"postprocess",
|
|
9638
9680
|
"processAllTokens"
|
|
9639
9681
|
])), _class);
|
|
9640
|
-
var
|
|
9682
|
+
var D = class {
|
|
9641
9683
|
walkTokens(e, t) {
|
|
9642
9684
|
let n = [];
|
|
9643
9685
|
for (let r of e)switch(n = n.concat(t.call(this, r)), r.type){
|
|
@@ -9792,16 +9834,16 @@ var B = class {
|
|
|
9792
9834
|
if (typeof n > "u" || n === null) return a(new Error("marked(): input parameter is undefined or null"));
|
|
9793
9835
|
if (typeof n != "string") return a(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n) + ", string expected"));
|
|
9794
9836
|
if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async ()=>{
|
|
9795
|
-
let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer() : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
|
|
9837
|
+
let o = s.hooks ? await s.hooks.preprocess(n) : n, p = await (s.hooks ? await s.hooks.provideLexer(e) : e ? x.lex : x.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
|
|
9796
9838
|
s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
|
|
9797
|
-
let h = await (s.hooks ? await s.hooks.provideParser() : e ? b.parse : b.parseInline)(c, s);
|
|
9839
|
+
let h = await (s.hooks ? await s.hooks.provideParser(e) : e ? b.parse : b.parseInline)(c, s);
|
|
9798
9840
|
return s.hooks ? await s.hooks.postprocess(h) : h;
|
|
9799
9841
|
})().catch(a);
|
|
9800
9842
|
try {
|
|
9801
9843
|
s.hooks && (n = s.hooks.preprocess(n));
|
|
9802
|
-
let l = (s.hooks ? s.hooks.provideLexer() : e ? x.lex : x.lexInline)(n, s);
|
|
9844
|
+
let l = (s.hooks ? s.hooks.provideLexer(e) : e ? x.lex : x.lexInline)(n, s);
|
|
9803
9845
|
s.hooks && (l = s.hooks.processAllTokens(l)), s.walkTokens && this.walkTokens(l, s.walkTokens);
|
|
9804
|
-
let c = (s.hooks ? s.hooks.provideParser() : e ? b.parse : b.parseInline)(l, s);
|
|
9846
|
+
let c = (s.hooks ? s.hooks.provideParser(e) : e ? b.parse : b.parseInline)(l, s);
|
|
9805
9847
|
return s.hooks && (c = s.hooks.postprocess(c)), c;
|
|
9806
9848
|
} catch (o) {
|
|
9807
9849
|
return a(o);
|
|
@@ -9812,7 +9854,7 @@ var B = class {
|
|
|
9812
9854
|
return (n)=>{
|
|
9813
9855
|
if (n.message += `
|
|
9814
9856
|
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
9815
|
-
let r = "<p>An error occurred:</p><pre>" +
|
|
9857
|
+
let r = "<p>An error occurred:</p><pre>" + T(n.message + "", !0) + "</pre>";
|
|
9816
9858
|
return t ? Promise.resolve(r) : r;
|
|
9817
9859
|
}
|
|
9818
9860
|
if (t) return Promise.reject(n);
|
|
@@ -9833,7 +9875,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
9833
9875
|
this.use(...e);
|
|
9834
9876
|
}
|
|
9835
9877
|
};
|
|
9836
|
-
var L = new
|
|
9878
|
+
var L = new D;
|
|
9837
9879
|
function g(u, e) {
|
|
9838
9880
|
return L.parse(u, e);
|
|
9839
9881
|
}
|
|
@@ -9841,7 +9883,7 @@ g.options = g.setOptions = function(u) {
|
|
|
9841
9883
|
return L.setOptions(u), g.defaults = L.defaults, G(g.defaults), g;
|
|
9842
9884
|
};
|
|
9843
9885
|
g.getDefaults = M;
|
|
9844
|
-
g.defaults =
|
|
9886
|
+
g.defaults = O;
|
|
9845
9887
|
g.use = function(...u) {
|
|
9846
9888
|
return L.use(...u), g.defaults = L.defaults, G(g.defaults), g;
|
|
9847
9889
|
};
|
|
@@ -9858,7 +9900,7 @@ g.lexer = x.lex;
|
|
|
9858
9900
|
g.Tokenizer = w;
|
|
9859
9901
|
g.Hooks = P;
|
|
9860
9902
|
g.parse = g;
|
|
9861
|
-
var
|
|
9903
|
+
var Qt = g.options, jt = g.setOptions, Ft = g.use, Ut = g.walkTokens, Kt = g.parseInline, Wt = (/* unused pure expression or super */ null && (g)), Xt = b.parse, Jt = x.lex;
|
|
9862
9904
|
//# sourceMappingURL=marked.esm.js.map
|
|
9863
9905
|
|
|
9864
9906
|
|