This repository was archived by the owner on Nov 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
unexpected token: % #2
Copy link
Copy link
Open
Description
When I paste the example below into a GitBook
{% codetabs name="Python", type="py" -%}
msg = "Hello World"
print msg
{%- language name="JavaScript", type="js" -%}
var msg = "Hello World";
console.log(msg);
{%- language name="HTML", type="html" -%}
<b>Hello World</b>
{%- endcodetabs %}
And do
gitbook serve
I get this error:
Template render error: (/Users/tsu/projects/cucumber/cucumber/docs/10-minute-tutorial.md) [Line 16, Column 38]
unexpected token: %}
And the server stops.
To resolve it, I need to use this example:
{% codetabs name="Python", type="py" %}
msg = "Hello World"
print msg
{% language name="JavaScript", type="js" %}
var msg = "Hello World";
console.log(msg);
{% language name="HTML", type="html" %}
<b>Hello World</b>
{% endcodetabs %}
The difference is the usage of -% and %-
I installed GitBook using [email protected] and is using node v6.3.0
Have I found a bug in the documentation or am I using codetabs incorrect?
msilvatec, belgoros, glamp and krabbypattified
Metadata
Metadata
Assignees
Labels
No labels