Skip to content

CORE-2241 Fixed parsing of spreadsheet rows with italics etc#444

Merged
Dantemss merged 1 commit into
mainfrom
fix-parsing
May 29, 2026
Merged

CORE-2241 Fixed parsing of spreadsheet rows with italics etc#444
Dantemss merged 1 commit into
mainfrom
fix-parsing

Conversation

@Dantemss
Copy link
Copy Markdown
Member

https://openstax.atlassian.net/browse/CORE-2241

The parsing was broken when the row contained italics (only the italics content was returned). This was because Roo would make the content something like <html>Some <i>italics</i> text</html> Kramdown would discard everything besides the italics. The solution is to strip out the html tags.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes spreadsheet import parsing for rich-text Excel cells by removing Roo’s outer <html>...</html> wrapper before Kramdown parses the cell content, preserving surrounding plain text and inline formatting.

Changes:

  • Normalizes spreadsheet cell values by stripping Roo’s rich-text <html> wrapper.
  • Expands the assessment import spec fixture expectations from 3 to 4 exercises.
  • Adds assertions that italicized rich-text content is preserved in imported stems and answers.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
app/routines/process_spreadsheet.rb Strips Roo-generated outer HTML wrappers from normalized cell values before downstream parsing.
spec/routines/exercises/import/assessments_spec.rb Updates import expectations and verifies italicized spreadsheet content is imported correctly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Dantemss Dantemss marked this pull request as ready for review May 28, 2026 18:52
@Dantemss Dantemss requested a review from jivey May 28, 2026 18:52
@Dantemss Dantemss merged commit 70df042 into main May 29, 2026
6 checks passed
@Dantemss Dantemss deleted the fix-parsing branch May 29, 2026 20:44
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

Successfully merging this pull request may close these issues.

3 participants