todvora / gitbook-plugin-image-captions

Image captions plugin for GitBook
Apache License 2.0
44 stars 18 forks source link

BUG: When the summary.md links to sections, count and list of figures are messed up #25

Open erikvullings opened 6 years ago

erikvullings commented 6 years ago

For example, when my summary looks like the example below:

# Summary

* [Executive summary](README.md)
* [Test-bed for Trial owners](trial-owners.md)
  * [Standalone evaluation](trial-owners.md#evaluation)
  * [Running a trial](trial-owners.md#trial)

My three pictures generate the following list of 9 pictures (one set of three for trial-owners.html#fig... which is correct, one set of three for the first section link trial-owners#evaluation#fig... and one set of three for the second section link). This does not only affect the list of figures, but also the nro count.

{"backlink":"trial-owners.html#fig1.4.1","level":"1.4","listcaption":"Figure: Test-bed composer's home page","alt":"Test-bed composer's home page","nro":30,"url":"img/test-bed-composer-home.png","index":1,"caption_template":"Figure _PAGE_IMAGE_NUMBER. CAPTION.","label":"Test-bed composer's home page","attributes":{},"skip":false,"key":"1.4.1"}

Test-bed composer's home page

{"backlink":"trial-owners.html#fig1.4.2","level":"1.4","listcaption":"Figure: Test-bed composer: Selecting a solution","alt":"Test-bed composer: Selecting a solution","nro":31,"url":"img/test-bed-composer-solutions.png","index":2,"caption_template":"Figure _PAGE_IMAGE_NUMBER. CAPTION.","label":"Test-bed composer: Selecting a solution","attributes":{},"skip":false,"key":"1.4.2"}

Test-bed composer: Selecting a solution

{"backlink":"trial-owners.html#fig1.4.3","level":"1.4","listcaption":"Figure: Test-bed composer: Downloading the docker-compose.yml file","alt":"Test-bed composer: Downloading the docker-compose.yml file","nro":32,"url":"img/test-bed-composer-download.png","index":3,"caption_template":"Figure _PAGE_IMAGE_NUMBER. CAPTION.","label":"Test-bed composer: Downloading the docker-compose.yml file","attributes":{},"skip":false,"key":"1.4.3"}

Test-bed composer: Downloading the docker-compose.yml file

{"backlink":"trial-owners.html#evaluation#fig1.4.1.1","level":"1.4.1","listcaption":"Figure: Test-bed composer's home page","alt":"Test-bed composer's home page","nro":33,"url":"img/test-bed-composer-home.png","index":1,"caption_template":"Figure _PAGE_IMAGE_NUMBER. CAPTION.","label":"Test-bed composer's home page","attributes":{},"skip":false,"key":"1.4.1.1"}

Test-bed composer's home page

{"backlink":"trial-owners.html#evaluation#fig1.4.1.2","level":"1.4.1","listcaption":"Figure: Test-bed composer: Selecting a solution","alt":"Test-bed composer: Selecting a solution","nro":34,"url":"img/test-bed-composer-solutions.png","index":2,"caption_template":"Figure _PAGE_IMAGE_NUMBER. CAPTION.","label":"Test-bed composer: Selecting a solution","attributes":{},"skip":false,"key":"1.4.1.2"}

Test-bed composer: Selecting a solution

{"backlink":"trial-owners.html#evaluation#fig1.4.1.3","level":"1.4.1","listcaption":"Figure: Test-bed composer: Downloading the docker-compose.yml file","alt":"Test-bed composer: Downloading the docker-compose.yml file","nro":35,"url":"img/test-bed-composer-download.png","index":3,"caption_template":"Figure _PAGE_IMAGE_NUMBER. CAPTION.","label":"Test-bed composer: Downloading the docker-compose.yml file","attributes":{},"skip":false,"key":"1.4.1.3"}

Test-bed composer: Downloading the docker-compose.yml file

{"backlink":"trial-owners.html#trial#fig1.4.2.1","level":"1.4.2","listcaption":"Figure: Test-bed composer's home page","alt":"Test-bed composer's home page","nro":36,"url":"img/test-bed-composer-home.png","index":1,"caption_template":"Figure _PAGE_IMAGE_NUMBER. CAPTION.","label":"Test-bed composer's home page","attributes":{},"skip":false,"key":"1.4.2.1"}

Test-bed composer's home page

{"backlink":"trial-owners.html#trial#fig1.4.2.2","level":"1.4.2","listcaption":"Figure: Test-bed composer: Selecting a solution","alt":"Test-bed composer: Selecting a solution","nro":37,"url":"img/test-bed-composer-solutions.png","index":2,"caption_template":"Figure _PAGE_IMAGE_NUMBER. CAPTION.","label":"Test-bed composer: Selecting a solution","attributes":{},"skip":false,"key":"1.4.2.2"}

Test-bed composer: Selecting a solution

{"backlink":"trial-owners.html#trial#fig1.4.2.3","level":"1.4.2","listcaption":"Figure: Test-bed composer: Downloading the docker-compose.yml file","alt":"Test-bed composer: Downloading the docker-compose.yml file","nro":38,"url":"img/test-bed-composer-download.png","index":3,"caption_template":"Figure _PAGE_IMAGE_NUMBER. CAPTION.","label":"Test-bed composer: Downloading the docker-compose.yml file","attributes":{},"skip":false,"key":"1.4.2.3"}