Skip to content

Commit

Permalink
Fix auto-closing directive blocks in apacheconf
Browse files Browse the repository at this point in the history
  • Loading branch information
FIameCaster committed May 2, 2024
1 parent a5b53b1 commit 616b7f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package/src/languages/apacheconf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ languageMap.apacheconf = {
([start, end], value) =>
/<\w+\b.*>$/.test(getLineBefore(value, start)) && /^<\/\w+\b.*>/.test(value.slice(end)),
],
autoCloseTags: ([start], value) => {
return /<(\w+)\b.*>/.exec(getLineBefore(value, start) + ">")?.[1]
autoCloseTags([start], value) {
let match = /<(\w+)\b.*>/.exec(getLineBefore(value, start) + ">")
return match! && `</${match[1]}>`
},
}

0 comments on commit 616b7f7

Please # to comment.