long lines ok in code blocks

This commit is contained in:
h00die 2020-01-22 21:08:32 -05:00
parent a099481f66
commit 0c13102432
1 changed files with 7 additions and 1 deletions

View File

@ -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