The problem is that the var might not be a var yet. You'd have to
re-render code after evaluation.

Phil

Christopher Small <metasoar...@gmail.com> writes:

> Seems like this shouldn't be a problem as long as you only try to render a 
> link if there's actually such a var. This might be a little messier, but 
> would make things (overall) nicer (I think) because you wouldn't have to 
> think about a separate bit of syntax. The rendering would just happen 
> differently depending on whether or not there was something to link to. I 
> already do markdown in most of my docstrings anyway, and I'd prefer not 
> having to rewrite a bunch of docstrings to take advantage of such a 
> feature; I'm sure there are others with me as well :-)
>
> This arguably violates least-surprise / separation of concerns, but in my 
> opinion not so significantly that the costs outweigh the benefits (again, 
> as long as you only tried to link if you knew it was a var).
>
> My 2 cents...
>
> Chris
>
>
> On Sunday, May 15, 2016 at 2:03:02 PM UTC-7, James Reeves wrote:
>>
>> If the docstrings are written in markdown, this would conflict as 
>> something in backticks isn't necessarily a var name.
>>
>> In Codox, I used the wiki-link style: [[clojure.core/map]].
>>
>> - James
>>
>> On 15 May 2016 at 18:40, cskksc <ckop...@gmail.com <javascript:>> wrote:
>>
>>> Hello,
>>> 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 there.
>>> 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 clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to