Skip to content


URL References dont work across sections #100

phenomnomnominal opened this Issue · 3 comments

3 participants


It would seem that URL references e.g.

[Google][1], [1]:
[GitHub][], [github]:

only work within the single block-comment in which they are declared?

For example:

# Look at this link to [Google][]! 
# [google]:

would work, but

# Look at this link to [Google][]!

# [google]:


Unless I'm doing something heaps wrong (and please tell me if I am), this means that one of the main possible benefits of using them - being able to refer to them multiple times in a document - doesn't work.

Would there be a way to gather all the URL references and use them throughout the documentation?


This is due to the way that Docco parses comments, taking each line at a time and pushing that through a Markdown translator (showdown). Your second example is actually two separate markdown documents (according to the current implementation of Docco).

Referring to them multiple times in a document will currently not work because of this. This would be a worthy enhancement, but a very big one. It might help to switch from the Showdown markdown parser to markdown parser. I'll leave that for others to hash out though.


Thanks for the reply, that's pretty much what I suspected.

@justindujardin justindujardin added a commit that referenced this issue
@justindujardin justindujardin Fix for issue #100: Batch process markdown docs in the same way that …
…code highlighting is handled.

Add test to verify that url references work properly.

@keithamus Pull request #112 fixed this, so it can probably be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.