Repository navigation
תיקון issue #4497 — סינון ניווט PDF: דף עם סימן עמוד כמילה שלמה, ודירוג מדויק/תחילית - #6088
Merged
Merged
Conversation
…ה, ודירוג מדויק/תחילית הנרמול של האיתור (3602983, 15.6) מוחק "." ו-":", ולכן בחלונית הניווט של PDF "ב." תאם כל כותרת שיש בה ב (יב., נב., קב. …) ו"קיא:" היה שווה ל"קיא.". הסינון שמר את סדר תוכן העניינים בלי דירוג (נשמר גם ב-7592b6240), כך שהשורות הראשונות היו דפים אחרים. שאילתה שמסתיימת בסימן עמוד מחפשת עכשיו את הדף כמילה שלמה בכותרת, עם אותו סימן עמוד או בלי סימן; והתוצאות מדורגות מדויק, תחילית ואז הכלה (findNormalizedTextMatchRank), ובתוך דרגה לפי סדר תוכן העניינים. normalizeFindText לא השתנה.
Y-PLONI
force-pushed
the
fix/pdf-outline-filter-rank-4497
branch
from
November 27, 2026 01:36
fb03f59 to
1d512b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
מה היה שבור
בחלונית "ניווט" של ספר PDF (למשל חולין), חיפוש "ב." הציג קודם דפים אחרים (יב., נ.…, נב., קב.), כי כל כותרת שיש בה האות ב נמצאה. חיפוש "קיא:" החזיר גם את "קיא." וגם את "קיא:" באותה דרגה, ובסדר תוכן העניינים "קיא." בא קודם. מי שלחץ על השורה הראשונה הגיע לדף הלא נכון.
סיבת השורש
containsבלי גבול מילה. כך היה גם לפני הנרמול, ולכן "ב." תמיד מצא גם את "נב." ואת "יב.".normalizeFindText, שמוחק "." ו-":". מאז "ב." הופך ל"ב" ומוצא כל כותרת שיש בה ב (גם "ב:"), ו"קיא." ו"קיא:" הפכו לאותה מחרוזת. סימן העמוד אבד.התיקון
ב-
filterPdfOutline(lib/pdf_book/view/pdf_outlines_screen.dart):findNormalizedTextMatchRankהקיים). בתוך אותה דרגה נשמר סדר תוכן העניינים.normalizeFindTextלא השתנה, ולכן האיתור בספרי טקסט ובחלוניות אחרות לא מושפע.הערה: אם אחרי התיקון לחיצה על "קיא:" עדיין מובילה לעמוד אחר, הסיבה כנראה ביעד הסימנייה בקובץ ה-PDF עצמו (
dest.pageNumber). זו בעיית נתונים בספרייה ולא בקוד, ולא נבדקה כאן כי הקובץ לא זמין.Closes #4497
בדיקות
test/pdf_book/pdf_outline_daf_amud_filter_test.dart(4 מקרים) נכשלת על dev ועוברת בענף.pdf_outline_search_filter_test.dartעודכנה: היא קבעה שסדר התוצאות זהה לסדר תוכן העניינים. עכשיו נבדק שתחילית ("דף ג") קודמת להכלה ("בבא בתרא דף ב"). שאר השאילתות עדיין נבדקות מולcontainsפשוט.flutter test -j 1 test/pdf_book/ועוד 6 קבצים שמייבאים אתpdf_book_screen: בענף 1196 עברו, 0 נכשלו, 0 דולגו. בבסיס (upstream/dev 4fe1973): 1192 עברו, 0 נכשלו, 0 דולגו (ההפרש הוא 4 הבדיקות החדשות).dart analyzeו-dart formatנקיים.ui_lint_cliזהה בין הענף לבסיס.