GithubHelp home page GithubHelp logo

kirby-footnotes's People

Contributors

sylvainjule avatar thsr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kirby-footnotes's Issues

Make footnotes plugin usable with blocks

Thanks for this great plugin!
I was just giving it a try with the new blocks. And while I can get it to work within one block like so

<?php foreach ($page->thesis()->toBlocks() as $block): ?>

  <?php if ($block->type() == "text" || $block->type() == "markdown"): ?>
    <?= $block->text()->footnotes() ?>
  <?php else: ?>
    <?= $block  ?>
  <?php endif ?>

<?php endforeach ?>

it restarts the numbering of the footnotes with each block anew. That means I will have a footnote numbering like 1, 2, 3, 1, 2, 1, 2 etc. when I use more than one block.

It would be nice, if there would be an easy way to continue the numbering from the previous block.

Numbering in footnotes

Hello Sylvain,
Great plugin!

I have a bug as the footnotes are being rendered but the number of each is nor added to the LI( 1,23 etc) :

Screenshot 2020-04-13 at 15 25 28

Bug with identical footnotes

Identical footnotes lead to an issue with footnote references: all references are numbered with the num of the first occurrence.

Capture d’écran 2020-04-06 à 17 16 04

Capture d’écran 2020-04-06 à 17 16 31

Square brackets `[` inside footnotes break footnote

First of all: Thank you for this wonderful plugin! And the fix to use it within blocks!

Now: Having square brackets [ inside a footnote breaks the footnote. Which makes sense, because the regex looking out for footnotes found a ] and thus ends the footnote.

On the other hand: It is not unusual to have square brackets inside a footnote, e.g. [...] or to indicate that the editor changed the exact wording of some source, resulting in something like [^Footnote [...] text].

I think, the regex that looks out for [^ should only end a footnote, when it finds a ] AND in the meantime has found as many closing brackets as opening brackets it might have found in between. So after [^...[ the footnote only ends on the second ] it finds...

Thank you four considering.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.