Skip to content

Commit

Permalink
Merge c5c5cb5 into 9e462a4
Browse files Browse the repository at this point in the history
  • Loading branch information
thofma committed Jun 21, 2019
2 parents 9e462a4 + c5c5cb5 commit 758159a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/WeaveMarkdown/html.jl
@@ -1,6 +1,6 @@
#module Markdown2HTML
# Markdown to HTML writer, Modified from Julia Base.Markdown html writer
using Markdown: MD, Header, Code, Paragraph, BlockQuote, Footnote,
using Markdown: MD, Header, Code, Paragraph, BlockQuote, Footnote, Table,
Admonition, List, HorizontalRule, Bold, Italic, Image, Link, LineBreak,
LaTeX, isordered

Expand Down Expand Up @@ -167,6 +167,20 @@ function html(io::IO, comment::Comment)
write(io, "\n<!-- $(comment.text) -->\n")
end

function html(io::IO, md::Table)
withtag(io, :table) do
for (i, row) in enumerate(md.rows)
withtag(io, :tr) do
for c in md.rows[i]
withtag(io, i == 1 ? :th : :td) do
htmlinline(io, c)
end
end
end
end
end
end

html(io::IO, x) = tohtml(io, x)

# Inline elements
Expand Down

0 comments on commit 758159a

Please sign in to comment.