From aa2d8fd7db7d931632b5c2d9cfb02c43ab5f826d Mon Sep 17 00:00:00 2001 From: Iblis Lin Date: Mon, 14 Jan 2019 21:08:03 +0800 Subject: [PATCH] Julia: fix filename quoting in docstring Quoting filename with backticks to prevent markdown mis-rendering some of them with underscore. --- julia/src/util.jl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/julia/src/util.jl b/julia/src/util.jl index a836d3e39bba..ae2e50b92c55 100644 --- a/julia/src/util.jl +++ b/julia/src/util.jl @@ -183,15 +183,14 @@ end Extract the line of `Defined in ...` julia> mx._getdocdefine("sgd_update") -"Defined in src/operator/optimizer_op.cc:L53" -``` +"Defined in `src/operator/optimizer_op.cc:L53`" """ function _getdocdefine(name::String) op = _get_libmx_op_handle(name) str = _get_libmx_op_description(name, op)[1] lines = split(str, '\n') - for m ∈ match.(Ref(r"^Defined in .*$"), lines) - m != nothing && return m.match + for m ∈ match.(Ref(r"^Defined in ([\S]+)$"), lines) + m != nothing && return "Defined in `$(m.captures[1])`" end "" end