Inline image & aliases (and index corrected accordingly)
This commit is contained in:
parent
237a417396
commit
c2a44f40c5
|
|
@ -13,9 +13,9 @@ header>>{{blog-header py-3}}
|
|||
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
|
||||
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 !
|
||||
- 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.
|
||||
|
||||
And much much more !
|
||||
|
|
|
|||
|
|
@ -557,10 +557,9 @@ alias = alias_element + pp.Opt(optional)
|
|||
|
||||
# Syntax elements
|
||||
line_to_replace = pp.OneOrMore(
|
||||
pp.SkipTo(image ^ alias)('text').add_parse_action(of_type(TextToken))
|
||||
^ image.add_parse_action(of_type(ImageToken))
|
||||
^ alias.add_parse_action(of_type(AliasToken))
|
||||
) ^ pp.rest_of_line('text').add_parse_action(of_type(TextToken))
|
||||
pp.SkipTo(image)('text').add_parse_action(of_type(TextToken)) + image.add_parse_action(of_type(ImageToken)) |
|
||||
pp.SkipTo(alias)('text').add_parse_action(of_type(TextToken)) + alias.add_parse_action(of_type(AliasToken))
|
||||
) | pp.rest_of_line('text').add_parse_action(of_type(TextToken))
|
||||
|
||||
|
||||
##############################################################################
|
||||
|
|
|
|||
Loading…
Reference in New Issue