Skip to content

Commit 336628b

Browse files
Remove debug logging in Node set-/getproperty calls (#19)
Co-authored-by: Morten Piibeleht <morten.piibeleht@gmail.com>
1 parent f5e2204 commit 336628b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
* ![Feature][badge-feature] Implemented `replace` and `replace!` to safely mutate trees in arbitrary ways, and `empty!(node.children)` to remove all the children of a node
6+
* ![Bugfix][badge-bugfix] The `getproperty` and `setproperty!` methods no longer print unnecessary debug log. ([#19][github-19])
67

78
## Version `v0.1.1`
89

@@ -14,6 +15,7 @@ Initial release.
1415

1516
<!-- issue link definitions -->
1617
[github-16]: https://github.com/JuliaDocs/MarkdownAST.jl/pull/16
18+
[github-19]: https://github.com/JuliaDocs/MarkdownAST.jl/pull/19
1719
<!-- end of issue link definitions -->
1820

1921
[markdownast]: https://github.com/JuliaDocs/MarkdownAST.jl

src/node.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ function Base.getproperty(node::Node{T}, name::Symbol) where T
117117
getfield(node, :meta)
118118
else
119119
# TODO: error("type Node does not have property $(name)")
120-
@debug "Accessing private field $(name) of Node" stacktrace()
121120
getfield(node, name)
122121
end
123122
end
@@ -129,11 +128,9 @@ function Base.setproperty!(node::Node, name::Symbol, x)
129128
setfield!(node, :meta, x)
130129
elseif name in propertynames(node)
131130
# TODO: error("Unable to set property $(name) for Node")
132-
@debug "Setting private field :$(name) of Node" stacktrace()
133131
setfield!(node, name, x)
134132
else
135133
# TODO: error("type Node does not have property $(name)")
136-
@debug "Accessing private field :$(name) of Node" stacktrace()
137134
setfield!(node, name, x)
138135
end
139136
end

0 commit comments

Comments
 (0)