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] Preserve whitespace in feedback within pools [MER-2482] #190

Closed andersweinstein closed 1 year ago

andersweinstein commented 1 year ago

XML.toJSON takes a list of elements within which to preserve whitespace. This call is duplicated for different document types. The call within pool document processing was not including question elements like feedback (also hints, choices, stems) in the list, causing spaces before or after styled text (for example italicized) not wrapped in a paragraph in these elements to get dropped at this point. This was seen on feedback for pool items containing italicized words.

This changes to pass the same list of elements when processing pools as is used for formatives, on the theory that the same elements could occur in both places, That possibly includes more than is needed, but safe.