ronds-metadata 1.1.62 → 1.1.64
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/es/comps/MdView/index.js
CHANGED
@@ -6,7 +6,7 @@ import React from "react";
|
|
6
6
|
/*
|
7
7
|
* @Author: wangxian
|
8
8
|
* @Date: 2022-09-02 16:17:38
|
9
|
-
* @LastEditTime: 2022-11-
|
9
|
+
* @LastEditTime: 2022-11-23 09:09:46
|
10
10
|
*/
|
11
11
|
import ReactMarkdown from 'react-markdown';
|
12
12
|
import remarkGfm from 'remark-gfm';
|
@@ -41,12 +41,13 @@ var MdView = function MdView(props) {
|
|
41
41
|
children = _ref.children,
|
42
42
|
props = _objectWithoutProperties(_ref, _excluded);
|
43
43
|
|
44
|
-
var match = /language-(\w+)/.exec(className || '');
|
44
|
+
var match = /language-(\w+)/.exec(className || 'javascript');
|
45
45
|
return !inline && match ? /*#__PURE__*/React.createElement(SyntaxHighlighter, _extends({
|
46
46
|
showLineNumbers: true,
|
47
47
|
style: oneLight,
|
48
48
|
language: match[1],
|
49
|
-
PreTag: "div"
|
49
|
+
PreTag: "div",
|
50
|
+
className: "self-highlighter"
|
50
51
|
}, props), String(children).replace(/\n$/, '')) : /*#__PURE__*/React.createElement("code", _extends({
|
51
52
|
className: className
|
52
53
|
}, props), children);
|
@@ -219,12 +219,16 @@
|
|
219
219
|
}
|
220
220
|
}
|
221
221
|
pre {
|
222
|
-
padding:
|
223
|
-
background-color:
|
222
|
+
padding: 10px !important;
|
223
|
+
background-color: rgb(250, 250, 250);
|
224
224
|
code {
|
225
225
|
font-weight: 300;
|
226
226
|
background-color: transparent;
|
227
227
|
}
|
228
|
+
.self-highlighter {
|
229
|
+
padding: 0 !important;
|
230
|
+
margin: 0 !important;
|
231
|
+
}
|
228
232
|
}
|
229
233
|
|
230
234
|
// list
|