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

Glossary cleanup script removes too many terms #20

Open
michael-n-cooper opened this issue Dec 5, 2018 · 4 comments
Open

Glossary cleanup script removes too many terms #20

michael-n-cooper opened this issue Dec 5, 2018 · 4 comments
Assignees

Comments

@michael-n-cooper
Copy link
Member

Glossary cleanup script removes terms that aren't referenced in document. But it doesn't look in terms themselves, resulting in terms referenced only by other terms being removed.

@michael-n-cooper
Copy link
Member Author

MC to provide detailed steps to reproduce.

@joanmarie
Copy link
Contributor

@michael-n-cooper: I figured I'd try to come up with some steps locally to repro the problem. So I tried using Core-AAM and it's local aria-common files. Adding terms to terms.html causes them them to appear in the glossary whether used or not. So I need a hint on the steps to reproduce. Please and thank you.

@michael-n-cooper
Copy link
Member Author

I see the terms list being filtered. For instance, if I load core-aam locally, the term "Activation behavior" is in terms.html but does not appear in the core-aam.

The problem is excessive filtering. In core-aam, the definition for "class" is removed because it is not referenced anywhere in the spec. But it is referenced from the definition of "object", which isn't filtered out because it's referenced in the spec. This causes the link in the "object" definition to the "class" definition to wind up broken.

joanmarie added a commit that referenced this issue Jan 16, 2019
The script logic was returning early for all internal references
which were not also directly referenced by the main content (for
instance "class" and "text node" from Core AAM).

The script already keeps track of unused (by the main content) in
the termNames array. Therefore, we can check that array to see if
it contains the parent glossary term. If so, then return early like
before. Otherwise, let the script proceed.

Addresses github issue #20.
@joanmarie
Copy link
Contributor

Thanks @michael-n-cooper! Best place to hide something from me is right in front of my face. 😁 I believe I've fixed it (and done so in a sane fashioned). Please review PR #23.

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