Remove unused code

This commit is contained in:
Marcus Blättermann 2022-11-27 01:37:42 +01:00
parent 049279657a
commit e5c4b18ccc
No known key found for this signature in database
GPG Key ID: A1E1F04008AC450D

View File

@ -45,21 +45,6 @@ function remarkCodeBlocks(userOptions = {}) {
// GitHub URL // GitHub URL
attrs.github = 'true' attrs.github = 'true'
} }
// If it's a bash code block and single line, check for prompts
if (lang === 'bash') {
const [trueFirstLine, ...trueLines] = node.value.split('\n')
for (let prompt of options.prompts) {
if (trueFirstLine.startsWith(prompt)) {
const content = [
trueFirstLine.slice(prompt.length).trim(),
...trueLines,
]
attrs.prompt = prompt
node.value = content.join('\n')
break
}
}
}
const data = node.data || (node.data = {}) const data = node.data || (node.data = {})
const hProps = data.hProperties || (data.hProperties = {}) const hProps = data.hProperties || (data.hProperties = {})