Browse Source

fix format_documentation for `[code skip-lint]` (#700)

Dillon Bayless 1 year ago
parent
commit
d915dccba1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/providers/documentation_builder.ts

+ 2 - 0
src/providers/documentation_builder.ts

@@ -362,6 +362,8 @@ function make_codeblock(code: string, language: string) {
 }
 
 function format_documentation(bbcode: string, classname: string) {
+	// ya-bbcode doesn't parse [code skip-lint] as a [code] tag
+	bbcode = bbcode.replaceAll("[code skip-lint]", "[code]");
 	let html = parser.parse(bbcode.trim());
 
 	html = html.replaceAll(/\[\/?codeblocks\](<br\/>)?/g, "");