julia
d7feb44d - [Markdown] Fix all diagnostics reported by `jetls check` (#63662)

Commit
40 days ago
[Markdown] Fix all diagnostics reported by `jetls check` (#63662) * [Markdown] Clean up unused bindings and imports Address `lowering/*` diagnostics reported by `jetls check src/Markdown.jl`: - remove unused imports (`with_output_color`, `highlight`) and sort the import/export lists - drop the names of arguments that are only used for dispatch, and use `_` for the unused `columns` argument of `term` methods - remove unused local bindings - simplify the redundant `wasCode = ... && (wasCode = true)` in `rstinline` * [Markdown] Fix possible `nothing`-related errors reported by inference Address `inference/*` diagnostics reported by `jetls check src/Markdown.jl`: - use `something` for regex captures of groups that always participate in the match, so that `nothing` doesn't flow into `parse`, `lowercase`, `uppercasefirst` or `String` fields - assert the types of values that are known to be non-`nothing` from the control flow (`inline_code`, `github_table`) - call `sprint(rstinline, header.text)` directly in `rst(::IO, ::Header)`, since `rstinline(header.text)` may dispatch to `rstinline(::IO, md...)` when the type of `header.text` is unknown - make `percent_escape` take `AbstractString` and use a generator instead of `map`, so that `join` doesn't dispatch to `join(::IO, ...)` ---------
Author
Loading