dfreedm / jodoc-js

joDoc port to nodejs
http://joapp.com/#joDoc
Other
26 stars 9 forks source link

toclinker/html_header? #5

Open drewwells opened 13 years ago

drewwells commented 13 years ago

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.

dfreedm commented 13 years ago

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

davebalmer commented 13 years ago

_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).

drewwells commented 13 years ago

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 commented 13 years ago

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