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

122 feat cross linking with glossary file globs #133

Merged
merged 3 commits into from
Dec 19, 2020

Conversation

about-code
Copy link
Owner

@about-code about-code commented Dec 19, 2020

Adds support for

glossarify-md.conf.json

glossaries: [{
   "file": "./**/*.md"
}]

Note: If glossaries.file is a glob pattern glossaries.termHint and glossaries.title will be ignored.

Related: #122

…tle' will be ignored).

If 'file' is a glob pattern 'termHint' and 'title' will be ignored.
There are various reasons for this.

First is performance. For each file terminator had to scan the
'glossaries' array for entries with a glob pattern and test
whether the current entry is the one matching the file being
processed in order to apply the correct 'termHint' and 'title'.

Second: if there were two patterns matching the same file it
would not be possible to decide which 'termHint' to apply.
Basically 'termHint' loses its original purpose, anyways, if
there are multiple files using the same term hint.

Third: glob patterns are being introduced to support cross-linking.
Unlike the option's name suggests documents being matched are no longer
glossaries, only but any document. Headings are no longer terms
but headings being processed like terms. So 'termHint' isn't a hint
on a term anymore.
@about-code about-code merged commit 705f9a0 into master Dec 19, 2020
@about-code about-code deleted the 122-feat-cross-linking-with-glossary-file-globs branch December 19, 2020 20:48
about-code added a commit that referenced this pull request Dec 28, 2020
…glossaries[i].file` config is a glob.

Regression related to #133

commit d34feaf721bf83b73157404658d589681cd590e1
Author: about-code <6525873+about-code@users.noreply.github.com>
Date:   Sun Dec 27 22:35:52 2020 +0100

    test: New baseline.

commit 40a798113f944d0a96ce00598e105c40bf4ae85c
Author: about-code <6525873+about-code@users.noreply.github.com>
Date:   Sun Dec 27 22:32:27 2020 +0100

    test: Add test case

commit 9aa55b06c4f59c6a2b1bf247f9a392a16096ab98
Author: about-code <6525873+about-code@users.noreply.github.com>
Date:   Sun Dec 27 22:01:55 2020 +0100

    fix: Wrong link to glossary definition in generated index file when `glossaries[i].file` config is a glob.
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

Successfully merging this pull request may close these issues.

None yet

1 participant