Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Added support for parsing nested comments - #408

Merged
vallentin merged 3 commits into
mainfrom
nested-comments
Dec 18, 2020
Merged

Added support for parsing nested comments#408
vallentin merged 3 commits into
mainfrom
nested-comments

Conversation

@vallentin

Copy link
Copy Markdown
Collaborator

I added support for nested comments, i.e. {# foo {# bar #} baz #}. Now Askama is more on par with Rust.

I sometimes comment out chunks of a template when testing stuff. If that chunk already contains comments, then that becomes harder.

  • Updated parser
  • Added comments test case
  • Updated book

Assuming no one has comments like {# {# #}, then this is a non-breaking change.

@djc djc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, some style nits.

Comment thread askama_shared/src/parser.rs Outdated
Comment thread askama_shared/src/parser.rs Outdated
Comment thread askama_shared/src/parser.rs Outdated
@vallentin
vallentin force-pushed the nested-comments branch 2 times, most recently from d87d668 to e49eb60 Compare December 18, 2020 13:10
Comment thread askama_shared/src/parser.rs Outdated

@djc djc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for obliging me! Feel free to (rebase) merge once CI is done.

@vallentin

Copy link
Copy Markdown
Collaborator Author

No problem! Just as a note, I haven't forgotten about #396, I just need to look more into the get_skip stuff.

@vallentin
vallentin merged commit 61912c5 into main Dec 18, 2020
@delete-merged-branch
delete-merged-branch Bot deleted the nested-comments branch December 18, 2020 14:05
@djc

djc commented Dec 18, 2020

Copy link
Copy Markdown
Collaborator

No problem!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants