Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Jinja#1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
aelaguiz wants to merge9 commits intomaster
base:master
Choose a base branch
Loading
fromjinja
Open

Jinja#1

aelaguiz wants to merge9 commits intomasterfromjinja

Conversation

@aelaguiz
Copy link
Member

  • Parses jinja more fully

@makesitgood
Copy link
Member

This looks good so far. When I was trying to build on this previously I got caught up on jinja within html tags, things like

<a href="/whatever">Whatever</a><input type="checkbox" name="mycheck" {% if mycheck_selected %}checked{% endif %}/>

That really spidered out places that needed to expect a jinja statement start. You've got a test that should cover the first case, what about the second?

If someone does something odd like

<{{ lol_tags }}>Things</{{ lol_tags }}>

Is it easy enough to make the error message "Invalid cratejoy syntax at line: " I can't think of a legit reason for that one, but it'd be valid jinja and potentially a pain in the ass to interpret.

@aelaguiz
Copy link
MemberAuthor

They parse fine, although the jinja in that class isn't actually parsed. My goal isn't really to build the world's best parser but just to catch additional types of errors.

I've tested this against all of our merchants themes and it works fine / catches the things I want it to catch. It definitely can miss things, but I'm open to it being improved over time.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@aelaguiz@makesitgood

[8]ページ先頭

©2009-2025 Movatter.jp