Skip to content

Commit

Permalink
feat: remove options and use DEBUG environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioSimou committed Sep 26, 2022
1 parent e03329f commit 8a5747f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
parseList
} from './parsers/index.js'

export default async function parseMD(body, {silent = false}) {
export default async function parseMD(body) {
const tokens = await unified().use(remarkParse).use(remarkGfm).parse(body)
if (!tokens) {
return []
Expand Down Expand Up @@ -76,7 +76,7 @@ export default async function parseMD(body, {silent = false}) {
const obj = structuredResponse[currentHeading]
obj.content.push(token.children[0].value)
} else {
if(!silent){
if(process.env.DEBUG){
console.log('unhandled token type')
console.log(token)
}
Expand Down

0 comments on commit 8a5747f

Please sign in to comment.