long lines ok in code blocks
This commit is contained in:
parent
a099481f66
commit
0c13102432
|
@ -199,9 +199,15 @@ class MsftidyDoc
|
|||
|
||||
def line_checks
|
||||
idx = 0
|
||||
in_codeblock = false
|
||||
|
||||
@lines.each do |ln|
|
||||
idx += 1
|
||||
|
||||
if ln.scan(/```/).length.odd?
|
||||
in_codeblock = !in_codeblock
|
||||
end
|
||||
|
||||
if ln =~ /[ \t]$/
|
||||
warn("Spaces at EOL", idx)
|
||||
end
|
||||
|
@ -211,7 +217,7 @@ class MsftidyDoc
|
|||
end
|
||||
|
||||
l = 140
|
||||
if ln.length > l
|
||||
if ln.length > l && !in_codeblock
|
||||
warn("Line too long (#{ln.length}). Consider a newline (which resolves to a space in markdown) to break it up around #{l} characters.", idx)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue