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

Markdown extension for linking to a function in docstrings and comments #157

Open
metasoarous opened this issue May 17, 2015 · 1 comment

Comments

@metasoarous
Copy link

Something else we could get with ids on code blocks (see #155) is linking between functions in docstrings and comments. Something like:

;; This is a function that calls [[foo/bar]], and does stuff
(defn stuff []
  "And a docstring about calling [[foo/bar]]..."
  (foo/bar "stuff"))

That would I think be pretty slick, and useful. I realize this could be a bit more challenging than #155 and #156 depending on how the markdown is getting processed. Would probably have to be some pre-processing step.

@cryptonomicon314
Copy link

I'm working on pyccoon (https://github.com/cryptonomicon314/pyccoon), a fork of pycco, which, like marginalia, is a python fork of docco.
Pyccoon, unlike Marginalia, is set to support multiple languages, although how well each language is supported deppends on the authors.

While I'm not the project's maintainer, I've been working on integrating with clojure, which on my branch is the most well supported language. It features:

  1. Links to definitions in the source (it is not yet namespace aware, but will be soon)
  2. Automatic links to function definitions, both on the same file, on different files in the same project and from external packages (on https://crossclj.info/).

My python code has only the most superficial understanding of clojure, but with a little help from the user and some curated package data (to map from namespaces to package names) I can get pretty cool results.

Much of the new functionality is not yet documented, but I would like your feedback on the output. This is the result of running pyccoon on a slightly customized version of the re-frame package.

The source is hyperlinked (although the links have no special formatting), so feel free to explore and click around.

Major bug: the links don't handle (:require namespace :exclude [...]) directives very well yet.

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

2 participants