Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
- Loading branch information
Showing
3 changed files
with
5 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,7 +245,7 @@ def _split_shortcodes(data): | |
return result | ||
|
||
|
||
def apply_shortcodes(data, registry, site=None): | ||
def apply_shortcodes(data, registry, site=None, filename=None): | ||
"""Apply Hugo-style shortcodes on data. | ||
{{% name parameters %}} will end up calling the registered "name" function with the given parameters. | ||
|
@@ -303,5 +303,5 @@ def apply_shortcodes(data, registry, site=None): | |
result.append(res) | ||
return empty_string.join(result) | ||
except ParsingError as e: | ||
LOGGER.error("{0}".format(e)) | ||
LOGGER.error("Shortcode error in file {0}: {1}".format(filename, e)) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Kwpolska
Author
Member
|
||
sys.exit(1) |
How about also making sure the error message sounds good when
filename
isNone
? After all,filename
is optional.