Skip to content

Problems with liquid include parameters containing non-Western characters #47

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
crandmck opened this issue Sep 13, 2016 · 4 comments
Closed
Labels

Comments

@crandmck
Copy link
Contributor

I ran into a roadblock working on #37. Jekyll/Liquid generates an error when processing includes with non-Western parameter values, e.g.

{% include important.html content="
LoopBackがどのように動くかを理解するには**まずこのページをお読みください。次に、LoopBack
アプリケーションを作成するための基本的な紹介として [Getting started with LoopBack]
(/doc/{{page.lang}}/lb2/Getting-started-with-LoopBack.html)
を参照してください。" %}

The error is:

Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences: 
important.html content=" LoopBackがどのように動くかを理解するには**まずこのページをお読みく
ださい。次に、LoopBackアプリケーションを作成するための基本的な紹介として [Getting started 
with LoopBack](/doc/ja/lb2/Getting-started-with-LoopBack.html) Valid syntax: {% include file.ext 
param='value' param2='value' %} in pages/ja/lb2/LoopBack-core-concepts.md

The English content makes extensive use of Liquid includes (with parameters) for alerts and numerous other things. So we need to resolve this or find a workaround, otherwise it's going to be much more difficult to provide translations of the docs.

@crandmck crandmck added the bug label Sep 13, 2016
@crandmck crandmck changed the title Problems with non-Western character liquid include parameters Problems with liquid include parameters containing non-Western characters Sep 13, 2016
@crandmck
Copy link
Contributor Author

@Setogit @eddiemonge @cfjedimaster @joesepi Would appreciate any help based on your Jekyll experience. To repro, just copy/paste above into any page in the repo and then follow instructions in the README... Thanks!

@joesepi
Copy link

joesepi commented Sep 14, 2016

I think this is an issue with Liquid. This may be related? Shopify/liquid#31

I'm on my phone so I am not able to test.

@crandmck
Copy link
Contributor Author

Thanks @joesepi This may indeed be the source of the issue. Need to see if we can come up with a workaround, or if we're just hosed. :-(

@crandmck
Copy link
Contributor Author

OK, it turns out that the issue is the liquid variable {{page.lang}} in the include parameter text, not the Chinese characters. Doh!

The good news is that we can move forward with localization plans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants