We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 046d847 commit e03329fCopy full SHA for e03329f
src/parse.js
@@ -14,7 +14,7 @@ import {
14
parseList
15
} from './parsers/index.js'
16
17
-export default async function parseMD(body) {
+export default async function parseMD(body, {silent = false}) {
18
const tokens = await unified().use(remarkParse).use(remarkGfm).parse(body)
19
if (!tokens) {
20
return []
@@ -76,8 +76,10 @@ export default async function parseMD(body) {
76
const obj = structuredResponse[currentHeading]
77
obj.content.push(token.children[0].value)
78
} else {
79
- console.log('unhandled token type')
80
- console.log(token)
+ if(!silent){
+ console.log('unhandled token type')
81
+ console.log(token)
82
+ }
83
}
84
85
0 commit comments