if containsLatex text then
logLintIf linter.style.latex_docstring location
"Docstrings should use `$ $` or `$$ $$` for math formulas instead of `\\[ \\]` or `\\( \\)`."if containsLegacyUrlLink text then
logLintIf linter.style.latex_docstring location
"Docstring URLs should use `[label](https://...)`, not `[label][https://...]`."
run := withSetOptionIn fun stx =>doif stx.getKind == ``Lean.Parser.Command.moduleDoc thenlet text :=Syntax.getAtomVal stx[1]!
lintDocstring stx text
returnmatch stx with
| `(command| $mods:declModifiers theorem$name:declId $sig:declSig $val:declVal) =>let text := getDocstringText mods
if text != ""then
lintDocstring name text
| _ =>return