Transform your source code into easy to publish Markdown
- Total 278
- Win 150
- OS X 86
- Linux 42
|Mar 26||Mar 25||Mar 24||Mar 23||Mar 22||Mar 21||Mar 20||Mar 19||Mar 18||Mar 17||Mar 16||Mar 15||Mar 14||Mar 13||Mar 12||Mar 11||Mar 10||Mar 9||Mar 8||Mar 7||Mar 6||Mar 5||Mar 4||Mar 3||Mar 2||Mar 1||Feb 28||Feb 27||Feb 26||Feb 25||Feb 24||Feb 23||Feb 22||Feb 21||Feb 20||Feb 19||Feb 18||Feb 17||Feb 16||Feb 15||Feb 14||Feb 13||Feb 12||Feb 11||Feb 10|
SourceDown plugin for Sublime Text
Convert your commented scripts into Markdown documents. Can be useful for blog/forum posts, tutorials, basic literate programming/scripting.
The comments get uncommented and the code gets fenced/indented. Your comments are copied verbatim so if they contain valid Markdown it will be rendered correctly. The package supports any language supported by Sublime Text (it uses scopes to detect comments).
- Install Sublime Text
- Install the plugin either:
- with **Package Control** (recommended): see <https://sublime.wbond.net/docs/usage>, or - **manually**: by cloning this repository in your Sublime Text Package directory
source_down command transforms the contents of the current view into a Markdown file containing code snippets as raw text and comments as main text.
# # This is an example # # This `script` is *awesome*! # Just run it with # # > python awesome.py # # And enjoy! print("awesome") # TODO: add functionality
is turned into
# This is an example This `script` is *awesome*! Just run it with > python awesome.py And enjoy! ```python print("awesome") ``` TODO: add functionality
Which in turn can be compiled to
This is an example
scriptis awesome! Just run it with> python awesome.py
TODO: add functionality
Use the fenced GFM syntax for code snippets. If the snippet contains backticks than the fence will be extended until it is not ambiguous where it ends (see Pandoc).
This only processes the comments for producing the Markdown version.
Line comments are the ones starting with a marker and ending with the end of the line. This setting can take the values:
"all": all line comments will be converted to Markdown text;
"none": all line comments will be left as comments in the raw code block they belong to;
"lonely": only the “standalone” line comments, i.e. the ones taking the full line, will be converted.
This setting controls whether the block comments (the ones with start and end delimiters) are converted to Markdown text or left as comments in the raw code block they belong to.
Comments indented at a level greater than the one indicated will be kept as comments in a raw code block.
If true, the raw code blocks generated from code snippets will be deindented.
If true, the Markdown text extracted from comments will be deindented.
If true, the indentation level will take in account where the first line of a block comment starts. For example
a = 0 /* The following line will be deindented to level 0 */
gets converted to
```c a = 0 ``` The following line will be deindented to level 0
This is the file extension associated to Markdown files.