Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
heading(text, level, raw) {
let slug = slugo(raw)
const count = this._headings.filter(h => h === raw).length
if (count > 0) {
slug += `-${count}`
}
this._headings.push(raw)
return `${text}\n`
}