Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anchorParentSelector item not hidden #17

Closed
brunob opened this issue Apr 17, 2019 · 3 comments
Closed

anchorParentSelector item not hidden #17

brunob opened this issue Apr 17, 2019 · 3 comments
Assignees
Labels

Comments

@brunob
Copy link
Contributor

brunob commented Apr 17, 2019

Hi, switching from bigfoot to littlefoot, i've adapted the name of few settings i was using as this :

littlefoot.default({
	anchorPattern: /(nb\d+(footnote|appendix))/gi,
	anchorParentSelector: "span",
	footnoteParentClass: "spip_note_ref",
	footnoteSelector: "div"
});

Here is the original html of my footnotes anchors :

<span class="spip_note_ref">&nbsp;[<a href='#nb1' class='spip_note' rel='appendix' title='Outre le Porte-plume déjà intégré dans SPIP 2 et qui initiait ce mouvement, on&nbsp;(...)' id='nh1'>1</a>]</span>

And the generated html after littlefoot processing :

<span class="spip_note_ref">&nbsp;[<span class="littlefoot-footnote__container"><button class="littlefoot-footnote__button littlefoot-footnote__button__ellipsis" id="nh1" data-footnote-button-id="1" data-footnote-number="1" title="See Footnote 1" aria-controls="fncontent:1" aria-expanded="false" aria-label="Footnote 1" rel="footnote"><svg viewBox="0 0 31 6" preserveAspectRatio="xMidYMid"><circle r="3" cx="3" cy="3" fill="white"></circle><circle r="3" cx="15" cy="3" fill="white"></circle><circle r="3" cx="27" cy="3" fill="white"></circle></svg></button></span><a href="#nb1" class="spip_note footnote-print-only" rel="appendix" title="Outre le Porte-plume déjà intégré dans SPIP 2 et qui initiait ce mouvement, on&nbsp;(...)" id="nh1">1</a>]</span>

It matkes that the text content of the <span class="spip_note_ref"> is not hidden, which result to something like [ button ] in the page.

The difference i observe is that bigfoot was putting its markup before the anchor parent element and hiding it. Instead of this, littlefoot insert its markup in the anchor parent element.

Am i missing something or is it a bug in anchorParentSelector setting ?

FTR here is a demo page running on bigfoot : https://labo.eliaz.fr/article135.html

@goblindegook
Copy link
Owner

Could be a bug. Thanks for reporting, I will investigate further.

@goblindegook
Copy link
Owner

Fixed for the upcoming 2.0 release.

@brunob
Copy link
Contributor Author

brunob commented May 7, 2019

\o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants