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] Fixed bug causing formulas to import as inline when they could be block #166

Closed marc-hughes closed 1 year ago

marc-hughes commented 1 year ago

Fixes https://github.com/Simon-Initiative/oli-torus/issues/3642

To reproduce:

  1. Have a with plaintext in it directly in the body of a document
  2. Convert that to torus format

Expected: It gets converted to a callout Actual: callout_inline

The test for whether the element should be inline or not includes checking for text-nodes as siblings. That test didn't filter out empty text nodes, and returned a false-positive for requiring it to be inline