Skip to content

Commit

Permalink
Update markdown tests for inline tex and footnotes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHatherly committed Dec 13, 2015
1 parent 841c932 commit b378e9c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions test/markdown.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is a part of Julia. License is MIT: http://julialang.org/license

using Base.Markdown
import Base.Markdown: MD, Paragraph, Header, Italic, Bold, LineBreak, plain, term, html, Table, Code, LaTeX
import Base.Markdown: MD, Paragraph, Header, Italic, Bold, LineBreak, plain, term, html, Table, Code, LaTeX, Footnote
import Base: writemime

# Basics
Expand Down Expand Up @@ -38,8 +38,18 @@ h2
foo
```
""" == MD(Code("julia", "foo"))
@test md"``code```more code``" == MD(Any[Paragraph(Any[Code("","code```more code")])])
@test md"``code``````more code``" == MD(Any[Paragraph(Any[Code("","code``````more code")])])

@test md"foo ``bar`` baz" == MD(Paragraph(["foo ", LaTeX("bar"), " baz"]))

@test md"""
```math
...
```
""" == MD(LaTeX("..."))

@test md"A footnote [^foo]." == MD(Paragraph(["A footnote ", Footnote("foo", nothing), "."]))

@test md"[^foo]: footnote" == MD(Paragraph([Footnote("foo", Any[" footnote"])]))

@test md"""
* one
Expand Down

0 comments on commit b378e9c

Please sign in to comment.