mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Colorize code in rule descriptions too
This commit is contained in:
parent
8ff621ba66
commit
bede3f97a1
2 changed files with 6 additions and 2 deletions
|
@ -244,7 +244,9 @@ module Ameba::Cli
|
|||
rule.severity.to_s.colorize(rule.severity.color),
|
||||
rule.enabled? ? ENABLED_MARK : DISABLED_MARK,
|
||||
}
|
||||
output_paragraph rule.description
|
||||
if rule_description = colorize_code_fences(rule.description)
|
||||
output_paragraph rule_description
|
||||
end
|
||||
|
||||
if rule_doc = colorize_code_fences(rule.class.parsed_doc)
|
||||
output_title "Detailed description"
|
||||
|
|
|
@ -62,7 +62,9 @@ module Ameba::Formatter
|
|||
rule.name.colorize(:magenta),
|
||||
rule.severity.to_s.colorize(rule.severity.color),
|
||||
}
|
||||
output_paragraph rule.description
|
||||
if rule_description = colorize_code_fences(rule.description)
|
||||
output_paragraph rule_description
|
||||
end
|
||||
|
||||
rule_doc = colorize_code_fences(rule.class.parsed_doc)
|
||||
return unless rule_doc
|
||||
|
|
Loading…
Reference in a new issue