Skip to content

Latest commit

 

History

History
88 lines (59 loc) · 1.1 KB

README.md

File metadata and controls

88 lines (59 loc) · 1.1 KB

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