Simon-Initiative / course-digest

Tool to produce a summary or digest of OLI course package contents
MIT License
2 stars 0 forks source link

[BUGFIX] Fix handling of term element within definition content [MER-2706] #210

Closed andersweinstein closed 1 year ago

andersweinstein commented 1 year ago

If a term is contained within the content of a definition (to highlight some term within that content), it gets migrated into a definition-term, a temporary tool-internal translation which is never eliminated in this case. This causes an “unsupported content element: definition-term” error after ingestion.

This happens because the restructuring code uses a selector "definition term" which reaches into arbitrarily nested descendants, so hits term elements within defnition content when it should not. Fix is to use a selector "definition>term" which finds only immediate children.