Python files (or any other programming scripts) with rendered markdown in comment blocks

Alright, I’ll take python as an example as it has the closest equivalent already existing.

I think it would be incredible if it was possible to write more lengthy documentation in a regular code script comment block, and have it properly render with wikilinks and all the obsidian goodness we are getting accustomed to.

The closest equivalent nowadays is the .ipython standard, but it approaches the problem from the opposite angle, which works for data science, but is less useful for more complex code.

This would look as follows:

‘’'markdown

Documentation

More advanced [[doc]]

‘’’

(Not sure if possible but going a step further and not requiring the markdown flag would be even nicer)

This wouldn’t impact the usability of python files in any other settings, but would allow for a pretty insane documentation workflow.

Additionally it would allow for writing documentation using ai assistance such as GitHub copilot in any other advanced IDE while still being browsable in obsidian.

I wouldnt have the ability to do this myself, but if any wizard is up to tackle that it would be nothing short of revolutionary for programmers like myself!

Thoughts?

1 Like

wow! It’s very interesting

1 Like

Programming scripts, whether in Python or any other language, are essential tools for software development. They allow us to create efficient and functional solutions to various problems. If you ever need assistance with C assignments, don’t hesitate to seek “с assignment help” to ensure your code is accurate and well-structured.

1 Like

Perfect example indeed! And this could be taken even further by making it possible to link to other scripts and elements of code. For example, “function a” is used for this, or this has to be done like so because of the way “function b” works!

This is partially available in my plugin Code Styler, in that you can set markdown links and wiki links inside codeblock comments. Unfortunately, this is limited in that the links do not appear in back links/ graphs since Obsidian has some limitations about how plugins add files. Does this solve your use case?