Closed bramtayl closed 4 years ago
This seems to do it:
using CommonMark
parser = Parser()
enable!(parser, [TableRule()])
parser(
"""
\"""
Interpolate using `\\\$`
\"""
a"""
)
Hopefully it's just a simple missing condition:
diff --git a/src/extensions/tables.jl b/src/extensions/tables.jl
index cb50f8f..75d5755 100644
--- a/src/extensions/tables.jl
+++ b/src/extensions/tables.jl
@@ -107,6 +107,7 @@ end
# Low priority since this *must* happen after nested structure of emphasis and
# links is determined. 100 should do fine.
inline_modifier(rule::TableRule) = Rule(100) do parser, block
+ block.t isa TableRow || return
isheader = block.parent.t isa TableHeader
spec = block.parent.parent.t.spec
max_cols = length(spec)
Could you try applying that to CommonMark and see what happens?
Yes, that seems to have done it! I enabled all the extensions and the test passed.
Good, thanks for confirming. I'll tag a patch release either late today, or tomorrow. I suppose this highlights the need for some thorough integration tests with all the extensions enabled.
Well, if the PR ever lifts off, JuliaFormatter could be a test suite unto itself!
Here's the error output when I just enable TableRule and run the tests. I'll see if I can't find a simpler reproducer.