@uiw/react-md-editor 3.20.7 → 3.20.8

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/dist/mdeditor.js CHANGED
@@ -14,20 +14,22 @@ return /******/ (() => { // webpackBootstrap
14
14
  /***/ 7071:
15
15
  /***/ (function(module) {
16
16
 
17
- /*!
18
- * @uiw/copy-to-clipboard v1.0.12
19
- * Copy to clipboard.
17
+ /**!
18
+ * @uiw/copy-to-clipboard v1.0.14
19
+ * Copy to clipboard.
20
20
  *
21
- * Copyright (c) 2021 Kenny Wang
22
- * https://github.com/uiwjs/copy-to-clipboard.git
21
+ * Copyright (c) 2023 Kenny Wang
22
+ * https://github.com/uiwjs/copy-to-clipboard.git
23
23
  *
24
- * Licensed under the MIT license.
24
+ * @website: https://uiwjs.github.io/copy-to-clipboard
25
+
26
+ * Licensed under the MIT license
25
27
  */
26
28
 
27
29
  (function (global, factory) {
28
30
  true ? module.exports = factory() :
29
31
  0;
30
- }(this, (function () { 'use strict';
32
+ })(this, (function () { 'use strict';
31
33
 
32
34
  /**
33
35
  * *** This styling is an extra step which is likely not required. ***
@@ -82,7 +84,7 @@ return /******/ (() => { // webpackBootstrap
82
84
 
83
85
  return copyTextToClipboard;
84
86
 
85
- })));
87
+ }));
86
88
  //# sourceMappingURL=copy-to-clipboard.umd.js.map
87
89
 
88
90
 
@@ -32929,12 +32931,7 @@ function toReact(context, node, index, parent) {
32929
32931
  )
32930
32932
  }
32931
32933
 
32932
- properties.key = [
32933
- name,
32934
- position.start.line,
32935
- position.start.column,
32936
- index
32937
- ].join('-')
32934
+ properties.key = index
32938
32935
 
32939
32936
  if (name === 'a' && options.linkTarget) {
32940
32937
  properties.target =
@@ -72688,7 +72685,13 @@ function rehypeStringify(config) {
72688
72685
  const rehype = unified().use(rehypeParse).use(rehypeStringify).freeze()
72689
72686
 
72690
72687
  ;// CONCATENATED MODULE: ./src/components/TextArea/Markdown.tsx
72691
- var _templateObject;function html2Escape(sHtml){return sHtml.replace(/```(\w+)?([\s\S]*?)(\s.+)?```/g,function(str){return str.replace(/[<&"]/g,function(c){return{'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});}).replace(/[<&"]/g,function(c){return{'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});}function Markdown(props){var prefixCls=props.prefixCls;var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),_useContext$markdown=_useContext.markdown,markdown=_useContext$markdown===void 0?'':_useContext$markdown,highlightEnable=_useContext.highlightEnable,dispatch=_useContext.dispatch;var preRef=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){if(preRef.current&&dispatch){dispatch({textareaPre:preRef.current});}// eslint-disable-next-line react-hooks/exhaustive-deps
72688
+ var _templateObject;function html2Escape(sHtml){return sHtml// .replace(/```(\w+)?([\s\S]*?)(\s.+)?```/g, (str: string) => {
72689
+ // return str.replace(
72690
+ // /[<&"]/g,
72691
+ // (c: string) => (({ '<': '&lt;', '>': '&gt;', '&': '&amp;', '"': '&quot;' } as Record<string, string>)[c]),
72692
+ // );
72693
+ // })
72694
+ .replace(/[<&"]/g,function(c){return{'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});}function Markdown(props){var prefixCls=props.prefixCls;var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),_useContext$markdown=_useContext.markdown,markdown=_useContext$markdown===void 0?'':_useContext$markdown,highlightEnable=_useContext.highlightEnable,dispatch=_useContext.dispatch;var preRef=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){if(preRef.current&&dispatch){dispatch({textareaPre:preRef.current});}// eslint-disable-next-line react-hooks/exhaustive-deps
72692
72695
  },[]);if(!markdown){return/*#__PURE__*/(0,jsx_runtime.jsx)("pre",{ref:preRef,className:"".concat(prefixCls,"-text-pre wmde-markdown-color")});}var mdStr="<pre class=\"language-markdown ".concat(prefixCls,"-text-pre wmde-markdown-color\"><code class=\"language-markdown\">").concat(html2Escape(String.raw(_templateObject||(_templateObject=_taggedTemplateLiteral(["",""])),markdown)),"\n</code></pre>");if(highlightEnable){try{mdStr=rehype().data('settings',{fragment:true}).use(m,{ignoreMissing:true}).processSync(mdStr).toString();}catch(error){}}return/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement('div',{className:'wmde-markdown-color',dangerouslySetInnerHTML:{__html:mdStr||''}});}
72693
72696
  ;// CONCATENATED MODULE: ../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
72694
72697