Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toclinker/html_header? #5

Open
drewwells opened this issue Jul 19, 2011 · 4 comments
Open

toclinker/html_header? #5

drewwells opened this issue Jul 19, 2011 · 4 comments

Comments

@drewwells
Copy link
Contributor

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
Copy link
Owner

dfreedm commented Jul 20, 2011

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

@davebalmer
Copy link
Collaborator

_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
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants