Browse Source
When making a nice looking table such as this: Term | Detail -------------- | -------------- First term | number one Second term | number two There is a potential to misinterpret the header line as the beginning of a code block (the indented type) since it begins with 5 spaces. Of course this could be addressed either by moving the "Term" string to the left at least 2 spaces or by adding the optional leading "|" to the beginning of the column, but that's unnecessarily ugly. Instead, when parsing a code block, check to see if the code block consists of exactly one line and when combined with the next line represents a valid table start. A valid table start specifies a header row and a separator row with exactly the same (positive integer) number of columns. If a valid table start is found, avoid making it into a code block and instead allow the table code to grab it and make it into a table. Signed-off-by: Kyle J. McKay <mackyle@gmail.com>master
Kyle J. McKay
4 years ago
1 changed files with 33 additions and 6 deletions
Loading…
Reference in new issue