debruine / glossary

Add glossaries to markdown and quarto documents
https://debruine.github.io/glossary/
Creative Commons Attribution 4.0 International
28 stars 3 forks source link

Multiple terms with the same first word #9

Open daniela-palleschi opened 6 months ago

daniela-palleschi commented 6 months ago

I'm trying to include both 'replication' and 'replication crisis' as terms, but only the definition for 'replication crisis' is printed in the table or pops up with hover.

Screenshot 2024-04-10 at 15 28 12

When I changed 'replication' to 'replicationy', then the definition for both terms was presented (i.e., when they don't have the same first word).

Screenshot 2024-04-10 at 15 27 55

Even when I use 'the replication crisis' the definition for 'replication' is not printed.

Screenshot 2024-04-10 at 15 30 57

Here is the code from the glossary.yml file:

power: |
  The probability of rejecting the null hypothesis when it is false, for a specific analysis, effect size, sample size, and criteria for significance.

reproducibility: |
  Re-generating the results from a given analysis, for which (minimally) the code and data must be available. Reproducibility is achieved when the same results are regenerated.

replication crisis: |
  A methodological crisis across sciences in which many previous studies, including foundational ones, have failed to replicate

replication: |
  Collecting new data to compare the new results to those from a previously reported study

With the following in my Quarto document:

library(glossary)
glossary_popup("hover")
glossary_path("glossary/glossary.yml")
glossary_table()

Are there any work around suggestions?

JanionNevill commented 5 months ago

I had the same issue with "Git" and "GitHub" as entries.

JanionNevill commented 5 months ago

Apparently, this issue has already been resolved, but it hasn't been released. If you remove the package from R, then reinstall using remotes::install_github("https://github.com/debruine/glossary"), then you will be able to include terms which extend other terms.

daniela-palleschi commented 5 months ago

@JanionNevill Great, that fixed the problem. Thanks!