azu / gitbook-plugin-include-codeblock

GitBook plugin for including file
Other
40 stars 25 forks source link

[title:"title"](path/to/file) cause unknown block tag #24

Closed azu closed 8 years ago

azu commented 8 years ago

I found a issue on title: feature #20 #19

OK:

[import, title:no-console.js](../../src/ESLint/no-console.js)

NG:

Template render error: (ja/ESLint/README.md) [Line 28, Column 10] unknown block tag: else (In file 'ja/ESLint/README.md')

[import, title:"no-console.js"](../../src/ESLint/no-console.js)

NG:

Template render error: (ja/ESLint/README.md) [Line 28, Column 10] unknown block tag: else (In file 'ja/ESLint/README.md')

[import, title:'no-console.js'](../../src/ESLint/no-console.js)

/cc @gdolle

azu commented 8 years ago

:" or :' is reserved syntax maybe on GitBook v3.

gdolle commented 8 years ago

@azu Ok I'll take a look. I think it could be a problem of escaping " or '

azu commented 8 years ago

I've got it. This is issue of template. it is not caused from :".

OK:

{{#if title}}
{{#if id}}
{% if file.type=="asciidoc" %}
> [[{{id}}]]link:{{originalPath}}[{{title}}]
{% else %}
> <a id="{{id}}" href="{{originalPath}}">{{title}}</a>
{% endif %}
{{else}}
{% if file.type=="asciidoc" %}
> [[{{title}}]]link:{{originalPath}}[{{title}}]
{% else %}
> <a id="{{title}}" href="{{originalPath}}">{{title}}</a>
{% endif %}
{{/if}}
{{else}}

NG:

{{#if title}}
    {{#if id}}
        {% if file.type=="asciidoc" %}
        > [[{{id}}]]link:{{originalPath}}[{{title}}]
        {% else %}
        > <a id="{{id}}" href="{{originalPath}}">{{title}}</a>
        {% endif %}
        {{else}}
        {% if file.type=="asciidoc" %}
        > [[{{title}}]]link:{{originalPath}}[{{title}}]
        {% else %}
        > <a id="{{title}}" href="{{originalPath}}">{{title}}</a>
        {% endif %}
    {{/if}}
{{else}}

We should remove padding space from each line. I will pull request to fix this.

gdolle commented 8 years ago

Ok nice catch!

Le 30 mai 2016 17:56:32 UTC+02:00, azu notifications@github.com a écrit :

I've got it. This is issue of template. it is not caused from :".

OK:

{{#if title}}
{{#if id}}
{% if file.type=="asciidoc" %}
> [[{{id}}]]link:{{originalPath}}[{{title}}]
{% else %}
> <a id="{{id}}" href="{{originalPath}}">{{title}}</a>
{% endif %}
{{else}}
{% if file.type=="asciidoc" %}
> [[{{title}}]]link:{{originalPath}}[{{title}}]
{% else %}
> <a id="{{title}}" href="{{originalPath}}">{{title}}</a>
{% endif %}
{{/if}}
{{else}}

NG:

{{#if title}}
   {{#if id}}
       {% if file.type=="asciidoc" %}
       > [[{{id}}]]link:{{originalPath}}[{{title}}]
       {% else %}
       > <a id="{{id}}" href="{{originalPath}}">{{title}}</a>
       {% endif %}
       {{else}}
       {% if file.type=="asciidoc" %}
       > [[{{title}}]]link:{{originalPath}}[{{title}}]
       {% else %}
       > <a id="{{title}}" href="{{originalPath}}">{{title}}</a>
       {% endif %}
   {{/if}}
{{else}}

We should remove padding space from each line. I will pull request to fix this.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/azu/gitbook-plugin-include-codeblock/issues/24#issuecomment-222519768

azu commented 8 years ago

I've pull request #25 This pull request drop code counting feature from default. Sorry about that.

gdolle commented 8 years ago

Ok,I thought also that using an option like numbering to enable it would be better. ;-)

Le 30 mai 2016 18:23:47 UTC+02:00, azu notifications@github.com a écrit :

I've pull request #25 This pull request drop code counting feature from default. Sorry about that.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/azu/gitbook-plugin-include-codeblock/issues/24#issuecomment-222523662