Skip to content

Provides syntax for Python-Markdown which allows for the inclusion of the contents of other Markdown documents.

License

Notifications You must be signed in to change notification settings

fonimus/markdown-include-snippets

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown Include Snippets

Based on project https://github.com/cmacmackin/markdown-include

Installation

# release
pip install git+https://github.com/fonimus/markdown-include-snippets.git@<tag>
# master
pip install git+https://github.com/fonimus/markdown-include-snippets.git

Usage

Whole file inclusion

{!/path/to/file.java!}
package io.fonimus;

public class Test {

    // tag::test
    public void test(){

    }
    // end::test

}

Tag snippet

{!/path/to/file.java!tag=test}
    public void test(){

    }

Single line snippet

{!/path/to/file.java!lines=3}
public class Test {

Line enumeration snippet

{!/path/to/file.java!lines=1,3,6}
package io.fonimus;
public class Test {
    public void test(){

Line range snippet

{!/path/to/file.java!lines=6-8}
    public void test(){

    }

Notes

  • If file is not found, blank line is added
  • If tag is not found, all file is included
  • If start tag or end tag is not found, all file is included

About

Provides syntax for Python-Markdown which allows for the inclusion of the contents of other Markdown documents.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%