Conversation
Replace the old "[Ja] marker correctness" model (conditions 1-4) with the English-first / Japanese-marker rule set (conditions 1-8): a Japanese block must be Japanese (1), the English block must not be Japanese (2), an inline Japanese marker preceded by Japanese (3), a Japanese block needs an English block above it (4), the inline end-of-line form is banned (5), the [Ja] marker must be unique (6), the [En] marker is obsolete (7), and a blank line must separate the two blocks (8). Full mode reports only the near-zero-false-positive conditions (1, 2, 3, 7) tree-wide via isFullModeCond; the rest are diff-only. Inline markers are detected only after a sentence end so prose mentions are ignored. The line-classification machinery (classifyLine, isEnglishText, the lineKind kinds, reLatin, reURLOnly) is replaced by commentBody, markerKind, and the inline-marker helpers, and the tests are rewritten to cover every condition. [Ja] comment サブコマンドを「英語先頭 / [Ja] マーカー」形式に作り直す 旧来の「[Ja] マーカーの正しさ」モデル (条件 1-4) を、英語先頭 / 日本語マーカーの 規則 (条件 1-8) に置き換える: 日本語ブロックは日本語 (1)、英語ブロックは日本語を 含まない (2)、前に日本語があるインライン日本語マーカー (3)、日本語ブロックの上に 英語ブロックが必要 (4)、インライン (行末) 形式は禁止 (5)、[Ja] マーカーは一意 (6)、 [En] マーカーは廃止 (7)、2 つのブロックの間に空行が必要 (8)。 全体モードは誤検出がほぼ無い条件 (1, 2, 3, 7) のみを isFullModeCond でツリー全体に 報告し、残りは差分モード限定。インラインマーカーは文末の後だけ検出し、地の文中の 言及は無視する。行分類の仕組み (classifyLine・isEnglishText・lineKind の各種別・ reLatin・reURLOnly) を commentBody・markerKind とインラインマーカー補助関数に置き 換え、テストも全条件を網羅するよう書き直した。
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.
No description provided.