From 336628bb9dcc1e3979459a1064f9a026a71babb1 Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Fri, 6 Oct 2023 07:58:29 +0200 Subject: [PATCH] Remove debug logging in Node set-/getproperty calls (#19) Co-authored-by: Morten Piibeleht --- CHANGELOG.md | 2 ++ src/node.jl | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bdef31..c934a31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased * ![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 +* ![Bugfix][badge-bugfix] The `getproperty` and `setproperty!` methods no longer print unnecessary debug log. ([#19][github-19]) ## Version `v0.1.1` @@ -14,6 +15,7 @@ Initial release. [github-16]: https://github.com/JuliaDocs/MarkdownAST.jl/pull/16 +[github-19]: https://github.com/JuliaDocs/MarkdownAST.jl/pull/19 [markdownast]: https://github.com/JuliaDocs/MarkdownAST.jl diff --git a/src/node.jl b/src/node.jl index f2fee62..683da41 100644 --- a/src/node.jl +++ b/src/node.jl @@ -117,7 +117,6 @@ function Base.getproperty(node::Node{T}, name::Symbol) where T getfield(node, :meta) else # TODO: error("type Node does not have property $(name)") - @debug "Accessing private field $(name) of Node" stacktrace() getfield(node, name) end end @@ -129,11 +128,9 @@ function Base.setproperty!(node::Node, name::Symbol, x) setfield!(node, :meta, x) elseif name in propertynames(node) # TODO: error("Unable to set property $(name) for Node") - @debug "Setting private field :$(name) of Node" stacktrace() setfield!(node, name, x) else # TODO: error("type Node does not have property $(name)") - @debug "Accessing private field :$(name) of Node" stacktrace() setfield!(node, name, x) end end