Commit a2a5041
committed
bugfix update column with Unicode comment
When we crete column with unicode comment, annotate gem does not update that annotation.
`\w` means a word character([a-zA-Z0-9_]) and it does not match unicode
leteers.
https://docs.ruby-lang.org/en/3.0.0/Regexp.html
Now `column_pattern` in `annotante_one_file` support
ascii characters only and doesn't match column with unicode comment.
So the columns will disappear from `old_columns` and `new_columns`.
https://github.com/ctran/annotate_models/blob/786394947c041f781df2ee0ea003e09452fa9dba/lib/annotate/annotate_models.rb#L378-L380
Even if we change that column (i.e. nullable to not null),
annotate_one_file's check ignore that column so annotation doesn't
update.
(The first time create it, it works, and the column annotation is left out of date)
So I fix column_pattern support unicode letter.1 parent 7863949 commit a2a5041
File tree
2 files changed
+31
-2
lines changed- lib/annotate
- spec/lib/annotate
2 files changed
+31
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
2598 | 2599 | | |
2599 | 2600 | | |
2600 | 2601 | | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
| 2623 | + | |
| 2624 | + | |
| 2625 | + | |
| 2626 | + | |
| 2627 | + | |
| 2628 | + | |
| 2629 | + | |
2601 | 2630 | | |
2602 | 2631 | | |
2603 | 2632 | | |
| |||
0 commit comments