Skip to content

Commit

Permalink
documentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vokimon committed Nov 21, 2022
1 parent 9cad748 commit ef6ee76
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ And, by default, generates HTML like this:
```html
<div class="mytype value-1" param2="value2">
<p>Indented <b>code</b></p>
<p>Indented <b>content</b></p>
</div>
```

This is using the default generator `container`.
But `mytype` could be bound to a Python function like the following one:
This is the output of the default generator: `container`.
But we could bound `mytype` to a custom Python function like the following one:

```python
def mygenerator(ctx, param1, param2):
Expand All @@ -99,10 +99,10 @@ def mygenerator(ctx, param1, param2):
And then, previous Markdown would generate this other HTML:

```html
<div attrib1="value 1" attrib2="value2">Indented **code**</div>
<div attrib1="value 1" attrib2="value2">Indented **content**</div>
```

Notice that this function is not scaping any received value
Notice that this function is not escaping any received value
and is not converting anything in the content to Markdown.
Luckily, `customblocks` provides some useful tools for that:
the hyperscript generator and the Markdown subparser:
Expand All @@ -120,7 +120,7 @@ You can read more about them at the [related documentation](https://vokimon.gith

## Built-in generators

The extension provides the following predefined generators:
For convenience, `customblocks` also provides the following predefined generators:

- [`container`](https://vokimon.github.io/markdown-customblocks/generators-container/):
A div element with arbitrary classes, attributes and content. This is the default when no type matches.
Expand Down

0 comments on commit ef6ee76

Please sign in to comment.