修訂 | 26b077b617b748c2b822ac05bfe29c07a76847b4 (tree) |
---|---|
時間 | 2014-10-29 11:05:04 |
作者 | ![]() |
Commiter | Takuya Nishimoto |
ti34545 cases such as h26a.pdf or http://0x1b
@@ -551,6 +551,21 @@ tests = [ | ||
551 | 551 | 'output': '⠼⠁⠃⠉⠰⠁', |
552 | 552 | }, |
553 | 553 | { |
554 | + 'text': 'h26a.pdf', | |
555 | + 'input': '⠦h26a.pdf⠴', | |
556 | + 'output': '⠦⠓⠼⠃⠋⠰⠁⠲⠏⠙⠋⠴', | |
557 | + }, | |
558 | + { | |
559 | + 'text': 'http://h26a.pdf', | |
560 | + 'input': '⠠⠦http://h26a.pdf⠠⠴', | |
561 | + 'output': '⠠⠦⠓⠞⠞⠏⠐⠂⠌⠌⠓⠼⠃⠋⠰⠁⠲⠏⠙⠋⠠⠴', | |
562 | + }, | |
563 | + { | |
564 | + 'text': 'http://0x1b', | |
565 | + 'input': '⠠⠦http://0x1b⠠⠴', | |
566 | + 'output': '⠠⠦⠓⠞⠞⠏⠐⠂⠌⠌⠼⠚⠭⠼⠁⠰⠃⠠⠴', | |
567 | + }, | |
568 | + { | |
554 | 569 | 'input': '123A', |
555 | 570 | 'output': '⠼⠁⠃⠉⠰⠠⠁', |
556 | 571 | }, |
@@ -437,6 +437,12 @@ def translateWithInPos(text, nabcc=False): | ||
437 | 437 | if not latin and not quote_mode: |
438 | 438 | retval += '⠰' |
439 | 439 | inPos.append(pos) |
440 | + elif (info_mode or quote_mode) and pos >= 1 and \ | |
441 | + text[pos-1].isdigit() and \ | |
442 | + text[pos] in 'abcdefghij': | |
443 | + # 外国語引用符または情報処理で数字のあとにa~jが続くときは小文字フラグ | |
444 | + retval += '⠰' | |
445 | + inPos.append(pos) | |
440 | 446 | elif info_mode and pos >= 2 and \ |
441 | 447 | text[pos-2].isdigit() and \ |
442 | 448 | text[pos-1] == '.' and \ |