Skip to content

fix(sefariasqlite): number and index Midrash Rabbah paragraphs - #103

Merged
kdroidFilter merged 1 commit into
masterfrom
fix/midrash-rabbah-paragraph-toc-509
Oct 8, 2026
Merged

kdroidFilter merged 1 commit into
masterfrom
fix/midrash-rabbah-paragraph-toc-509

Conversation

@kdroidFilter

Copy link
Copy Markdown
Owner

Summary

  • The Midrash Rabbah's paragraphs (אותיות) are Sefaria Integer segments, which the importer leaves unlabelled and keeps out of the TOC, so the books could only be navigated by parasha.
  • For the 10 Midrash Rabbah books (NUMBERED_PARAGRAPH_BOOKS), each paragraph now starts with its printed number ((א) …) and gets a TOC entry אות א under its parasha (or under the פתיחתא).
  • The TOC entry points at the paragraph line itself, so the text gets no extra heading line.
  • Line ids are unaffected: Sefaria lines are keyed on their heRef, which is unchanged.

Fixes kdroidFilter/Zayit#509

Test plan

  • ./gradlew :sefariasqlite:jvmTest (new SefariaNumberedParagraphsTest: labels, TOC levels/line indexes, unchanged heRefs, other books untouched)
  • Regenerate the DB (./gradlew generateSeforimDb) and check the בראשית רבה TOC in the app

The Midrash Rabbah's paragraphs (אותיות) are Sefaria "Integer" segments,
which the importer leaves unlabelled and keeps out of the TOC, so the
books could only be navigated by parasha.

For the ten Midrash Rabbah books, prefix each paragraph with its printed
number ("(א) ") and give it a TOC entry ("אות א") under its parasha. The
entry points at the paragraph line itself, so no heading line is added.
Line ids are unaffected: Sefaria lines are keyed on their heRef, which is
unchanged.

Fixes kdroidFilter/Zayit#509

Signed-off-by: Elie Gambache <elyahou.hadass@gmail.com>
@kdroidFilter
kdroidFilter merged commit 597cdee into master Oct 8, 2026
1 check passed
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.

Navigation in Midrash Rabbah

1 participant