Couldn"t you just do it like this?
1. Parse docstring into symbols
2. If symbol is defined in the current ns, hyperlink
3. If symbol is namespace-qualified, hyperlink
4. If symbol is name of an arg, hyperlink
This should leave very few false positives where an english word is the
name of a var in your ns or of an fn-arg which I'd expect to be very rare -
would be more than good enough for me.
Docstring syntax for IDEs and generators is something I never liked. They
are strings, not data, by definition. There are already too many
conventions for different tools so a a common convention is not likely to
happen so this would fragment how docstrings look like even more.
On Sunday, May 15, 2016 at 7:42:11 PM UTC+2, cskksc wrote:
> We are working on a new feature in CIDER which would parse a docstring and
> create hyperlinks that follow the functions/vars/interop-forms mentioned
> It is very similar to the "See Also" links shown by ClojureDocs
> <http://clojuredocs.org/>. Right now, we are using backticks to identify
> the reference forms and create links.
> So a function like;
> (defn test-mde
> "Does something with `user-ns/user-fn`.
> Also see: `clojure.core/map`, `clojure.core/reduce`, `defn`"
> (+ 1 1))
> would create hyperlinks for map, reduce, defn and user-ns/user-fn forms.
> What style do you tend to use in such docstrings ?
> It would help us figure out whether to continue with the backticks or do
> something else, like adding a configuration variable for this.
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to email@example.com
Note that posts from new members are moderated - please be patient with your
To unsubscribe from this group, send email to
For more options, visit this group at
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.