JuliaAttic/Markdown.jl

Tables

Opened this issue · 4 comments

dpo commented
> cat simple.md
column1 | column2
--------|--------
item1   | thing1
item2   | thing2
item3   | thing3
> julia
julia> using Markdown
julia> Markdown.parse_file("simple.md")

  column1 | column2 ––––|–––– item1   | thing1 item2   | thing2 item3   | thing3

I came across this behavior while using Docile.jl and Lexicon.jl, which use Markdown.jl. In the HTML output of my documentation, tables come out all garbled.

dpo commented

Just tested this with master and the problem is still there. Also README.md should say Markdown.parse_file instead of Markdown.parse.

Tables aren't part of the commonmark spec, but they could certainly be added to the GitHub flavour. If you need tables immediately I suggest adding a four-space indent to preserve the raw text.

A PR for the readme (or indeed tables, if you have time) is very welcome.

dpo commented

See #19 for the fix to README.md.

hayd commented

This is fixed in 0.4 master, and will be in next release of Markdown.jl:

julia> md"""column1 | column2
       --------|--------
       item1   | thing1
       item2   | thing2
       item3   | thing3"""
column1 column2
––––––– –––––––
  item1  thing1
  item2  thing2
  item3  thing3