Commit a3dbeb1
committed
Fix copyright detection for text-classified files and restore fixtures
This fixes a regression in numbered_text_lines() where valid text-bearing files were dropped when typecode reported contains_text == False, even though they were still text-classified and extractable.
The early return prevented cluecode from detecting copyright notices in files misidentified by libmagic. We now allow text-classified files through the normal extraction path instead of rejecting them prematurely.
This also restores corrupted ORT and junk-copyright fixture inputs that were causing false failures in the cluecode golden tests.1 parent 6ba5908 commit a3dbeb1
4 files changed
Lines changed: 14 additions & 2 deletions
File tree
- src/textcode
- tests/cluecode/data/copyrights
- misco4/to_improve
- ort
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
0 commit comments