Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Can't get Pod table formatted right #1821
I have this table in my code:
=begin table Type | Comments ========+================================================= Complex | Num | FatRat | MidRat | Special infectiousness. See prose that follows. Rat | Int | =end table
Which errors out with this:
I've no idea what it's talking about since as far as I can tell I've only used visible separators for all the things I wanted to use separators for.
I changed the code to this:
=begin table Type | Comments | ========+=================================================+ Complex | | Num | | FatRat | | MidRat | Special infectiousness. See prose that follows. | Rat | | Int | | =end table
And now the fatal error is gone, but I get a warning instead:
First of all, why is drawing the full table a "bad practice"? What's bad about it? And second, what's the right way to draw such a table?
Maybe you’ve found an edge case, and I’ll have to look at to see what triggers the error and warning.
I can’t tell at the moment, but are there two adjacent embedded spaces in the filled second column? If so, that will trigger a failure (see the docs: “Pod 6 Tables”). If there are one or more instances of two adjacent spaces, try escaping one space of each pair and see if that mitigates the error (and produces the desired results).
The warning is intended to keep table authors away from habits that can cause table failures more easily with subtle typos.
UPDATE After checking the Rakudo code I don’t see what is causing the error at the moment.
UPDATE 2. I think I see the problem. Can you try REMOVING the trailing pipes in your original version (just leave the single pipe separating the two columns of text) and see if that solves the problem. I’m not able to compute at the moment but your test would help me later.
You mean after
That feels like fence-sitting. Either make it fatal and forbid me from writing tables in that way or don't tell me anything. The warning just pollutes the output and doesn't really tell me what is wrong (I still don't follow what typos it's trying to protect me from).
On Sat, May 12, 2018 at 07:36 Zoffix Znet ***@***.***> wrote: two adjacent embedded spaces in the filled second column? You mean after See prose that follows.? No, there's just one space before the border and no spaces in the variant without the border.
See my update 2. I’m pretty sure that will fix the immediate problem for you. I won’t be able to work on the code for a while, but please let me know if the temp “fix” (removing the trailing pipes) works. Best.…
Your “baby-sitting” comments are spot on. Realize that when I finished that table pod work I was heavily invested in numerous edge cases and troublesome differences in vis and non-vis col sep tables, and I wanted to warn table authors about subtle traps. I will change the warning approach when I fix your problem: remove all warnings as the default unless an appropriate environment variable is set.
This still has the fatal error:
=begin table Type | Comments ========+================================================= Complex Num FatRat MidRat | Special infectiousness. See prose that follows. Rat Int =end table