The markdown tables don't appear to be rendering correctly, as @rviscomi mentions in the PR #215. This is just a bug to track the investigation / resolution.
Apologies for being so quiet, it's been heavy at work. Will try and look into the generate script and see what's wrong.
Thanks for filing this issue @mikegeyser. I totally understand that other commitments take precedence and greatly appreciate any time you can lend to this. 馃檹
@rviscomi I spent most of yesterday trying to debug the issue and I need some advice. The version of mistune published to pip is 0.8.4, and seems to have some endemic bugs - the regex that's responsible for tables just doesn't seem to work (looks like a problem with newlines). Additionally, the repo appears to be currently working on a v2 release that bears little resemblance to the version that we're using - leaving us in a bit of a bind. I believe that we have the following options available to us:
Which option do you think is the right one to pursue?
I'm really sorry about the problems, I thought mistune was the best choice, but I'm committed to fixing it asap (whichever way we go).
Thanks for digging into this. I'm leaning towards your showdown suggestion. Very few people actually need to run the chapter generation script so I'm not too worried about adding a new requirement to the toolchain. Let's just go with the most tried and true solution to keep things moving smoothly.
So I think I've found the root cause, it's the tables embedded inside <figure> elements (so that they have a <figcaption>. Most markdown renderers don't support parsing markdown inside html, but usually have a setting to enable it. In mistune it's parse_block_html=True but it doesn't appear to work...
In showdown it means adding an extra attribute in the md file, as follows:
<figure markdown>
| Fast FCP | Average FCP | Slow FCP |
| -------- | ----------- | -------- |
| 2.17% | 37.55% | 60.28% |
<figcaption>Figure 3. Table of the percent of websites labelled as having fast, average, or slow FCP.</figcaption>
</figure>
I've tested it, and it works - so I'm going to go ahead with the showdown implementation.
Great, thanks for working on this!
Was about to complain that it wasn't working until I reread your comment. I just needed the markdown attribute. Carry on! 馃槃
Most helpful comment
So I think I've found the root cause, it's the tables embedded inside
<figure>elements (so that they have a<figcaption>. Most markdown renderers don't support parsing markdown inside html, but usually have a setting to enable it. In mistune it'sparse_block_html=Truebut it doesn't appear to work...In showdown it means adding an extra attribute in the md file, as follows:
I've tested it, and it works - so I'm going to go ahead with the showdown implementation.