azu / gitbook-plugin-include-codeblock

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

指定行数のみインポート(slice code import support) #5

Closed matsu-chara closed 8 years ago

matsu-chara commented 8 years ago

私用で使うために、 [import:startRow-endRow](../src/hello-world.js) と書くとコードの一部分のみをインポートできるようにしました。

example in https://github.com/azu/gitbook-starter-kit/blob/master/ja/hello-world.md

before build(markdown):

all: [import, hello-world.js](../src/hello-world.js)
1-2: [import:1-2, hello-world.js](../src/hello-world.js)
2-3: [import:2-3, hello-world.js](../src/hello-world.js)
2- : [import:2-, hello-world.js](../src/hello-world.js)
 -3: [import:-3, hello-world.js](../src/hello-world.js)

after build(html):

example-hello-slice

もしよろしければご確認いただければ幸いです。

azu commented 8 years ago

ありがとうございます。マージします。

matsu-chara commented 8 years ago

ありがとうございました。

azu commented 8 years ago

gitbook-plugin-include-codeblock@1.5.0リリースしました