Skip to content

fix: parse lp flashcards when paragraph dir is missing#3250

Open
ahmedosamasawah wants to merge 2 commits intoquran:testingfrom
ahmedosamasawah:fix/flashcard-parser-no-dir
Open

fix: parse lp flashcards when paragraph dir is missing#3250
ahmedosamasawah wants to merge 2 commits intoquran:testingfrom
ahmedosamasawah:fix/flashcard-parser-no-dir

Conversation

@ahmedosamasawah
Copy link
Contributor

Summary

Fix flashcard rendering for learning plan lessons where word-by-word rows use <p> without dir attributes (seen on testing data).

Changes

  • Updated flashcardParser to parse word rows from generic <p> tags, not only dir="rtl|ltr".
  • Adjusted section split logic to keep stopping at non-word paragraphs.
  • Added a regression test for word-by-word rows without dir.

Why

Production and testing lesson HTML can differ. This makes flashcard parsing robust across both formats.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8b90d9268c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant