Skip to content

Commit

Permalink
Added trivial examples to extension docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie- authored and waylan committed Aug 1, 2019
1 parent 7dce2ae commit 7eeb133
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/extensions/abbreviations.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ See [Extensions](index.md) for general extension usage. Use `abbr` as the name
of the extension.

This extension does not accept any special configuration options.

A trivial example:

```python
markdown.markdown(some_text, extensions=['abbr'])
```
6 changes: 6 additions & 0 deletions docs/extensions/admonition.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,9 @@ See [Extensions](index.md) for general extension usage. Use `admonition` as the
name of the extension.

This extension does not accept any special configuration options.

A trivial example:

```python
markdown.markdown(some_text, extensions=['admonition'])
```
6 changes: 6 additions & 0 deletions docs/extensions/attr_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,9 @@ See [Extensions](index.md) for general extension usage. Use `attr_list` as the
name of the extension.

This extension does not accept any special configuration options.

A trivial example:

```python
markdown.markdown(some_text, extensions=['attr_list'])
```
6 changes: 6 additions & 0 deletions docs/extensions/code_hilite.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,11 @@ The following options are provided to configure the output:
`<code>` tag as a class in the manner suggested by the [HTML5 spec][spec]
(alternate output will not be entertained) and might be used by a JavaScript
library in the browser to highlight the code block.

A trivial example:

```python
markdown.markdown(some_text, extensions=['codehilite'])
```

[spec]: https://www.w3.org/TR/html5/text-level-semantics.html#the-code-element
6 changes: 6 additions & 0 deletions docs/extensions/definition_lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@ See [Extensions](index.md) for general extension usage. Use `def_list` as the
name of the extension.

This extension does not accept any special configuration options.

A trivial example:

```python
markdown.markdown(some_text, extensions=['def_list'])
```
8 changes: 7 additions & 1 deletion docs/extensions/fenced_code_blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The above will output:
</code></pre>
```

[GitHub][]'s backtick (`\``) syntax is also supported:
[GitHub][]'s backtick (`\``) syntax is also supported in this extension:

````md
```python
Expand Down Expand Up @@ -114,3 +114,9 @@ See [Extensions](index.md) for general extension usage. Use `fenced_code` as
the name of the extension.

This extension does not accept any special configuration options.

A trivial example:

```python
markdown.markdown(some_text, extensions=['fenced_code'])
```
6 changes: 6 additions & 0 deletions docs/extensions/footnotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,9 @@ The following options are provided to configure the output:

* **`SEPARATOR`**:
The text string used to set the footnote separator. Defaults to `:`.

A trivial example:

```python
markdown.markdown(some_text, extensions=['footnotes'])
```
6 changes: 6 additions & 0 deletions docs/extensions/legacy_attr.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,9 @@ See [Extensions](index.md) for general extension usage. Use `legacy_attr` as the
name of the extension.

This extension does not accept any special configuration options.

A trivial example:

```python
markdown.markdown(some_text, extensions=['legacy_attr'])
```
6 changes: 6 additions & 0 deletions docs/extensions/legacy_em.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ See [Extensions](index.md) for general extension usage. Use `legacy_em` as the
name of the extension.

This extension does not accept any special configuration options.

A trivial example:

```python
markdown.markdown(some_text, extensions=['legacy_em'])
```
6 changes: 6 additions & 0 deletions docs/extensions/meta_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ Usage
See [Extensions](index.md) for general extension usage. Use `meta` as the name
of the extension.

A trivial example:

```python
markdown.markdown(some_text, extensions=['meta'])
```

Accessing the Meta-Data
-----------------------

Expand Down
6 changes: 6 additions & 0 deletions docs/extensions/nl2br.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ See [Extensions](index.md) for general extension usage. Use `nl2br` as the name
of the extension.

This extension does not accept any special configuration options.

A trivial example:

```python
markdown.markdown(some_text, extensions=['nl2br'])
```
6 changes: 6 additions & 0 deletions docs/extensions/sane_lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,9 @@ See [Extensions](index.md) for general extension usage. Use `sane_lists` as the
name of the extension.

This extension does not accept any special configuration options.

A trivial example:

```python
markdown.markdown(some_text, extensions=['sane_lists'])
```
6 changes: 6 additions & 0 deletions docs/extensions/smarty.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ Option | Default value | Description
`smart_ellipses` | `True` | whether to convert ellipses
`substitutions` | `{}` | overwrite default substitutions

A trivial example:

```python
markdown.markdown(some_text, extensions=['smarty'])
```

Further reading
---------------

Expand Down
6 changes: 6 additions & 0 deletions docs/extensions/tables.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@ See [Extensions](index.md) for general extension usage. Use `tables` as the
name of the extension.

This extension does not accept any special configuration options.

A trivial example:

```python
markdown.markdown(some_text, extensions=['tables'])
```
8 changes: 7 additions & 1 deletion docs/extensions/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,10 @@ The following options are provided to configure the output:
will be present in the table. If you set `baselevel` to `3` and
`toc_depth` to `"2-6"`, the *first* headline will be `<h3>` and so still
included in the Table of Contents. To exclude this first level, you
have to set `toc_depth` to `"4-6"`.
have to set `toc_depth` to `"4-6"`.

A trivial example:

```python
markdown.markdown(some_text, extensions=['toc'])
```
6 changes: 6 additions & 0 deletions docs/extensions/wikilinks.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ The following options are provided to change the default behavior:

* **`build_url`**: Callable which formats the URL from its parts.

A trivial example:

```python
markdown.markdown(some_text, extensions=['wikilinks'])
```

### Examples

For an example, let us suppose links should always point to the sub-directory
Expand Down

0 comments on commit 7eeb133

Please sign in to comment.