diff --git a/example_userfiles/index.bpr b/example_userfiles/index.bpr index 8276fa3..d83caae 100644 --- a/example_userfiles/index.bpr +++ b/example_userfiles/index.bpr @@ -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 : :< filename > syntax you can import another file and have it's contents dumped into your file. +- Imports, with the ::< filename > 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 @[alias_name] syntax you can create an alias for a string of text, with replacement capabilities. +- Aliases : With the @[alias_name] syntax you can create an alias for a string of text, with replacement capabilities. - Images: With the @{imagename} syntax you can specify an image template to import, with replacement capabilities. And much much more ! diff --git a/src/bootstraparse/modules/syntax.py b/src/bootstraparse/modules/syntax.py index 42d3d84..8d68ec4 100644 --- a/src/bootstraparse/modules/syntax.py +++ b/src/bootstraparse/modules/syntax.py @@ -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)) ##############################################################################