Skip to content

Commit 89a8672

Browse files
authored
Bugfix: Corrected bug when using Module.function() syntax within expressions, which was previously causing errors due to the module being escaped. (#135)
1 parent c2c0b2d commit 89a8672

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# TidierData.jl updates
22

3+
## v0.16.5 - 2025-01-11
4+
- Bugfix: Corrected bug when using `Module.function()` syntax within expressions, which was previously causing errors due to the module being escaped.
5+
36
## v0.16.4 - 2025-01-11
47
- Bugfix: Only functions in Base, Core, and Statistics are not escaped. All other functions and callables are escaped.
58
- Updated minimum Julia version to 1.10

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "TidierData"
22
uuid = "fe2206b3-d496-4ee9-a338-6a095c4ece80"
33
authors = ["Karandeep Singh"]
4-
version = "0.16.4"
4+
version = "0.16.5"
55

66
[deps]
77
Chain = "8be319e6-bccf-4806-a6f7-6fae938471bc"

src/parsing.jl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,20 @@ function parse_interpolation(var_expr::Union{Expr,Symbol,Number,String};
473473
elseif @capture(x, variable_Symbol)
474474
if variable in not_escaped[]
475475
return variable
476-
elseif hasproperty(Base, variable) && !(typeof(getproperty(Base, variable)) <: Function) && !(typeof(getproperty(Base, variable)) <: Type)
476+
elseif hasproperty(Base, variable) &&
477+
!(typeof(getproperty(Base, variable)) <: Function) &&
478+
!(typeof(getproperty(Base, variable)) <: Type) &&
479+
!(typeof(getproperty(Base, variable)) <: Module)
477480
return esc(variable)
478-
elseif hasproperty(Core, variable) && !(typeof(getproperty(Core, variable)) <: Function) && !(typeof(getproperty(Core, variable)) <: Type)
481+
elseif hasproperty(Core, variable) &&
482+
!(typeof(getproperty(Core, variable)) <: Function) &&
483+
!(typeof(getproperty(Core, variable)) <: Type) &&
484+
!(typeof(getproperty(Core, variable)) <: Module)
479485
return esc(variable)
480-
elseif hasproperty(Statistics, variable) && !(typeof(getproperty(Statistics, variable)) <: Function) && !(typeof(getproperty(Statistics, variable)) <: Type)
486+
elseif hasproperty(Statistics, variable) &&
487+
!(typeof(getproperty(Statistics, variable)) <: Function) &&
488+
!(typeof(getproperty(Statistics, variable)) <: Type) &&
489+
!(typeof(getproperty(Statistics, variable)) <: Module)
481490
return esc(variable)
482491
else
483492
return variable

0 commit comments

Comments
 (0)