Skip to content

Commit

Permalink
closes #424
Browse files Browse the repository at this point in the history
  • Loading branch information
tlienart authored Mar 23, 2020
1 parent 0baf730 commit 43bbc9b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Franklin"
uuid = "713c75ef-9fc9-4b05-94a9-213340da978e"
authors = ["Thibaut Lienart <[email protected]>"]
version = "0.6.11"
version = "0.6.12"

This comment has been minimized.

Copy link
@tlienart

tlienart Mar 23, 2020

Author Owner

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
3 changes: 2 additions & 1 deletion src/parser/markdown/validate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ function find_double_brace_blocks(tokens)
thead = tokens[head]
if thead.name in (:LXB_OPEN, :LXB_CLOSE)
tcand = tokens[head+1]
if tcand.name == thead.name
nhead = nextind(str(thead), to(thead))
if from(tcand) == nhead && tcand.name == thead.name
name = ifelse(thead.name == :LXB_OPEN, :DB_OPEN, :DB_CLOSE)
ss = subs(str(thead), from(thead), to(tcand))
push!(db_tokens, Token(name, ss, 0))
Expand Down
11 changes: 11 additions & 0 deletions test/parser/markdown-extra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,14 @@ end
""" |> fd2html_td
@test isapproxstr(s, "hellogoodbye")
end

# issue 424 with double braces
@testset "Double brace2" begin
s = raw"""
@def title = "hello"
{{title}}
$\rho=\frac{e^{-\beta \mathcal{E}_{s}}} {\mathcal{Z}} $
""" |> fd2html_td
@test isapproxstr(s, """
hello \\(\\rho=\\frac{e^{-\\beta \\mathcal{E}_{s}}} {\\mathcal{Z}} \\)""")
end

1 comment on commit 43bbc9b

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/11392

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.12 -m "<description of version>" 43bbc9b12855257677b508db2a06a55e70ab9411
git push origin v0.6.12

Please sign in to comment.