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

Default footnotes ignore/overwrite existing footnotes #173

Closed
daylinmorgan opened this issue Feb 14, 2023 · 3 comments
Closed

Default footnotes ignore/overwrite existing footnotes #173

daylinmorgan opened this issue Feb 14, 2023 · 3 comments

Comments

@daylinmorgan
Copy link
Contributor

I sometimes use a simple numbering scheme with footnotes i.e. [^1][^2].

If a document already uses footnotes then the plugin will happily override them.

A simple solution may be to namespace the footnotes to make this less likely and add this info to the README.

For example

[^1-citation]: ....

[^ref1]: .....

Or perhaps exposing this a user configurable option and defaulting to the existing behavior.

plugins:
  - search
  - bibtex:
      bib_file: "refs.bib"
      footnote_format: "ref{number}"
markdown_extensions:
  - footnotes

I can submit a PR if this makes sense.

daylinmorgan added a commit to daylinmorgan/mkdocs-bibtex that referenced this issue Feb 14, 2023
@shyamd
Copy link
Owner

shyamd commented Feb 20, 2023

Yeah, this is a problem. I'm trying to refactor the tests so that they are feature-driven. Happy to accept a PR after that.

One question with namespacing: do you know if it will introduce any incompatibilities with older markdown or mkdocs versions?

@daylinmorgan
Copy link
Contributor Author

I think this should pose no issues with the python-markdown implementation.

daylinmorgan added a commit to daylinmorgan/mkdocs-bibtex that referenced this issue May 16, 2023
shyamd added a commit that referenced this issue Jun 6, 2023
#192)

* fix(#173): add config option to prevent clobbering user's numbered footnotes

* Add test cases for basic functionality

* ensure config becomes local arg

---------

Co-authored-by: shyamd <16827130+shyamd@users.noreply.github.com>
@shyamd
Copy link
Owner

shyamd commented Jun 6, 2023

Closed in #192 and released as v2.9.0. Thanks @daylinmorgan !

@shyamd shyamd closed this as completed Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants