Simon-Initiative / course-digest

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

[MER-2203] Normalizers are causing subscripts to be pushed onto newline #172

Closed marc-hughes closed 1 year ago

marc-hughes commented 1 year ago

Image captions have their own slate sub-editor, so the content in those captions must follow the document-level normalization rules we have in place.

Before, a caption might contain multiple inline elements such as: caption: [ {text:"hello"}, {text: "world"} ]

Now, those will get wrapped up into a paragraph. caption: [ {type: 'p', children:[{text:"hello"}, {text: "world"} ]]

This fixes an issue in chemistry import causing subscript text having extra linebreaks.

Before: image

After: image

Before: image

After: image