jodoc-js icon indicating copy to clipboard operation
jodoc-js copied to clipboard

toclinker/html_header?

Open drewwells opened this issue 13 years ago • 4 comments

It seems I can't open issues in my fork, so putting this here.

Automatic linking is happening everywhere not just in the TOC, causing markdown in source files to link to other files based on name alone. So while you may be documenting method core it will link to src/core.js#core.

drewwells avatar Jul 19 '11 21:07 drewwells

Yeah, that was the intention from what I remember. Magical linking.

dfreedm avatar Jul 20 '11 06:07 dfreedm

_Auto_magical linking... :) Powerful, and yet occasionally painful. It is case-sensitive, though, by design, to help alleviate the edge cases somewhat. That said, there are some cases in the regex where we're a bit aggressive with matching (file names being one case, if I recall from the perl version).

davebalmer avatar Jul 22 '11 12:07 davebalmer

That would be great in certain instances, but a blanket string replace is causing havoc for me. I'll think on this issue a bit to see if we can't do something clever, but less painful.

drewwells avatar Jul 22 '11 17:07 drewwells

Okay, how about [h1 text] links to the file, any objections to this? So based on my example above, this is what the graph looks like:

//Core.js
# Core
This is the core file

Markdown

 I have a cool file called core, click [core].

After processing this becomes

I have a cool file called core, you can find it at <a href="core.js">core</a>.

drewwells avatar Jul 27 '11 17:07 drewwells