dper / kanjiforanki

Takes a list of kanji and generates Anki flash cards for each them.
MIT License
11 stars 0 forks source link

Last letter of some examples missing #11

Closed dper closed 10 years ago

dper commented 10 years ago

In the elementary school deck, the last letter of the third example of some cards is missing. It's always the last letter of the third (last) example, but it's only missing for perhaps 1 in 20 cards.

dper commented 10 years ago

On further examination, this is definitely a trailing r issue.

dper commented 10 years ago

For example, here are two errors

空気 (くうき) - air
助教授 (じょきょうじゅ) - assistant professo
dper commented 10 years ago

The dictionary file is correct, so the problem must be in kanjiforanki.rb. It seems that examples where there's an r/ are leading to problems. Only the / should be cropped, but somehow the r is going with it.

dper commented 10 years ago

Solved. Regenerated the elementary and JHS lists.

I was using a custom written rstrip instead of the built-in chomp as would have been best. Switched, now using chomp, problem solved.