Skip to content

Commit 78ea025

Browse files
committed
fix: fix [[]] parse error
1 parent 1239660 commit 78ea025

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/TableEditor.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const TableEditor = ({ content = DEFAULT_TABLE }, ref) => {
7979
// ])
8080
// console.log('[faiz:] === tableEditor input: \n', content)
8181
const [value, setValue] = useState([stringToSlateValue(content)])
82-
console.log('[faiz:] === tableEditor format to Slate Editor Node: ', stringToSlateValue(content))
82+
// console.log('[faiz:] === tableEditor format to Slate Editor Node: ', stringToSlateValue(content))
8383

8484
useImperativeHandle(
8585
ref,

src/utils/parseRawInputByMarkdownIt.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const md = new MarkdownIt()
77
const parseMarkdownTable = (str) => {
88
const strArr = str.split('\n')
99
// token https://github.com/markdown-it/markdown-it/blob/master/lib/token.js
10-
const tokenList = md.parse(str)
10+
const tokenList = md.parse(str, {})
1111

1212
return tokenList
1313
.filter(token => token?.type === 'table_open')

0 commit comments

Comments
 (0)