Sha256: f0c6208e778eafac06f729cda615e0c32b73276bfdd0a3b74a2d022f74c637ba

Contents?: true

Size: 882 Bytes

Versions: 13

Compression:

Stored size: 882 Bytes

Contents

### Include Highlighted Code

Use file inclusion to include text as highlighted code.

#### File to Be Included

Here's a file containing Ruby code to be included:

@[markdown](hello.rb)

#### Includer File

Here's a template file that includes it:

@[markdown](includer.md)

The treatment token ```ruby``` specifies that the included text is to be highlighted as Ruby code.

The treatment token can be any Ace mode mentioned in [GitHub Languages](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml).  The file lists about 100 Ace modes, covering just about every language and format.

@[:markdown](../interface.md)

#### File with Inclusion

Here's the finished file with the included highlighted code:

@[:pre](included.md)

And here's the finished markdown, as rendered on this page:

---

@[:markdown](included.md)

---

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
markdown_helper-2.5.4 markdown/use_cases/include/include_highlighted_code/use_case_template.md
markdown_helper-2.5.3 markdown/use_cases/include/include_highlighted_code/use_case_template.md
markdown_helper-2.5.2 markdown/use_cases/include/include_highlighted_code/use_case_template.md
markdown_helper-2.5.1 markdown/use_cases/include/include_highlighted_code/use_case_template.md
markdown_helper-2.5.0 markdown/use_cases/include/include_highlighted_code/use_case_template.md
markdown_helper-2.4.0 markdown/use_cases/include/include_highlighted_code/use_case_template.md
markdown_helper-2.3.0 markdown/use_cases/include_files/include_highlighted_code/use_case_template.md
markdown_helper-2.2.0 markdown/use_cases/include_files/include_highlighted_code/use_case_template.md
markdown_helper-2.1.0 markdown/use_cases/include_files/include_highlighted_code/use_case_template.md
markdown_helper-2.0.0 markdown/use_cases/include_files/include_highlighted_code/use_case_template.md
markdown_helper-1.9.9 markdown/use_cases/include_files/include_highlighted_code/use_case_template.md
markdown_helper-1.9.5 markdown/use_cases/include_files/include_highlighted_code/use_case_template.md
markdown_helper-1.9.0 markdown/use_cases/include/include_highlighted_code/use_case_template.md