diff --git a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs index 290572bb0..6b6df752a 100644 --- a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs +++ b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs @@ -1938,12 +1938,20 @@ module internal SymbolReader = html.Append("") |> ignore | "code" -> + let lang = + match elem.Attributes("lang") |> Seq.isEmpty with + | true -> "" + | false -> + let lang = elem.Attribute("lang").Value + $"{lang} language-{lang}" html.Append("
") |> ignore
+ html.Append($"") |> ignore
let code = elem.Value.TrimEnd('\r', '\n', ' ')
let codeAsHtml = HttpUtility.HtmlEncode code
html.Append(codeAsHtml) |> ignore
+ html.Append("
") |> ignore
html.Append("
") |> ignore
// 'a' is not part of the XML doc standard but is widely used
| "a" -> html.Append(elem.ToString()) |> ignore