Merge pull request #37 from idle-org/features/aliases
Inline image & aliases (and index corrected accordingly)
This commit is contained in:
commit
09c8eef46b
|
|
@ -13,9 +13,9 @@ header>>{{blog-header py-3}}
|
||||||
bootstraparse is a tool that allows you to bootstrap your own project.
|
bootstraparse is a tool that allows you to bootstrap your own project.
|
||||||
In a very small number of steps, you can create a new project with the
|
In a very small number of steps, you can create a new project with the
|
||||||
following features:
|
following features:
|
||||||
- Imports, with the <code>: :< filename > </code>syntax you can import another file and have it's contents dumped into your file.
|
- Imports, with the <code> ::< filename > </code>syntax you can import another file and have it's contents dumped into your file.
|
||||||
- Markup, a subset of markdown is already supported and the rest is incomming !
|
- Markup, a subset of markdown is already supported and the rest is incomming !
|
||||||
- Aliases : With the <code> @[alias_name] </code> syntax you can create an alias for a string of text, with replacement capabilities.
|
- Aliases : With the <code> @[alias_name] </code> syntax you can create an alias for a string of text, with replacement capabilities.
|
||||||
- Images: With the <code> @{imagename} </code> syntax you can specify an image template to import, with replacement capabilities.
|
- Images: With the <code> @{imagename} </code> syntax you can specify an image template to import, with replacement capabilities.
|
||||||
|
|
||||||
And much much more !
|
And much much more !
|
||||||
|
|
|
||||||
|
|
@ -557,10 +557,9 @@ alias = alias_element + pp.Opt(optional)
|
||||||
|
|
||||||
# Syntax elements
|
# Syntax elements
|
||||||
line_to_replace = pp.OneOrMore(
|
line_to_replace = pp.OneOrMore(
|
||||||
pp.SkipTo(image ^ alias)('text').add_parse_action(of_type(TextToken))
|
pp.SkipTo(image)('text').add_parse_action(of_type(TextToken)) + image.add_parse_action(of_type(ImageToken)) |
|
||||||
^ image.add_parse_action(of_type(ImageToken))
|
pp.SkipTo(alias)('text').add_parse_action(of_type(TextToken)) + alias.add_parse_action(of_type(AliasToken))
|
||||||
^ alias.add_parse_action(of_type(AliasToken))
|
) | pp.rest_of_line('text').add_parse_action(of_type(TextToken))
|
||||||
) ^ pp.rest_of_line('text').add_parse_action(of_type(TextToken))
|
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue