You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ib...@apache.org on 2019/01/16 03:16:54 UTC

[incubator-mxnet] branch ib/jl-docstring-render created (now aa2d8fd)

This is an automated email from the ASF dual-hosted git repository.

iblis pushed a change to branch ib/jl-docstring-render
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git.


      at aa2d8fd  Julia: fix filename quoting in docstring

This branch includes the following new commits:

     new aa2d8fd  Julia: fix filename quoting in docstring

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-mxnet] 01/01: Julia: fix filename quoting in docstring

Posted by ib...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

iblis pushed a commit to branch ib/jl-docstring-render
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git

commit aa2d8fd7db7d931632b5c2d9cfb02c43ab5f826d
Author: Iblis Lin <ib...@hs.ntnu.edu.tw>
AuthorDate: Mon Jan 14 21:08:03 2019 +0800

    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 a836d3e..ae2e50b 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