Skip to content

Commit

Permalink
Fix jet (#163)
Browse files Browse the repository at this point in the history
* fix compat bounds

* fix test

* keyword defaults no in 1.0

* fix JET warnings

* version bump

* 1.05
  • Loading branch information
jverzani authored Aug 6, 2024
1 parent aece53e commit 00ae280
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "Mustache"
uuid = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70"
version = "1.0.19"
version = "1.0.20"

[deps]
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Expand Down
7 changes: 5 additions & 2 deletions src/context.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ function lookup(ctx::Context, key)


if m !== nothing
idx = m.captures[1]
idx = first(m.captures)
idx == nothing && throw(ArgumentError("XXX"))
vals = context.parent.view

# this has limited support for indices: "end", or a number, but no
Expand Down Expand Up @@ -147,7 +148,9 @@ function _lookup_in_view(view::Pair, key)
end

function _lookup_in_view(view::NamedTuple, key)
get(view, normalize(key), nothing)
key′ = normalize(key)
haskey(view, key′) && return getindex(view, key′)
return nothing
end

function _lookup_in_view(view::Module, key)
Expand Down
2 changes: 1 addition & 1 deletion src/tokens.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ end
####

## this is modified from dpeekchar in Tokenize
function peekaheadmatch(io::IOBuffer, m=['{','{'])
function peekaheadmatch(io::IO, m=['{','{'])
if !io.readable || io.ptr > io.size
return false
end
Expand Down

2 comments on commit 00ae280

@jverzani
Copy link
Owner Author

Choose a reason for hiding this comment

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

@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/112524

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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 the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.20 -m "<description of version>" 00ae28058eedb15db6df135a5b3229002a06afc5
git push origin v1.0.20

Please sign in to comment.