[[ISO:8601]]/[[JIS:X 0301]] をリンクにせず平文で表示する#242
Merged
Conversation
BitClust には ISO/JIS へのリンク機能がないため、Date/DateTime の ドキュメントにある [[ISO:8601]] や [[JIS:X 0301]] という記法がリンクに ならず、生の角括弧のまま表示されていた。リンクは諦めて、それぞれ 「ISO 8601」「JIS X 0301」という平文で表示するようにする。凍結された 古いバージョン(RD ソースを編集できない)にも効く。 - StandardRef で [[ISO:...]]/[[JIS:...]] を捕捉する。引数に空白を含む JIS X 0301 も拾えるよう、既存の BracketLink とは別の正規表現にする - standard_ref で scheme 名と引数を空白区切りの平文に変換する fix rurema#236 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
BitClust には ISO/JIS へのリンク機能がないため、Date/DateTime の
[[ISO:8601]][[JIS:X 0301]]がリンクにならず、生の角括弧のまま表示されていた(#236)。方針としてリンクは諦め、ISO 8601/JIS X 0301という平文で描画する。凍結された古いバージョン(RD ソースを編集できない)にも効くよう、コンパイラ側で対応した。StandardRefで[[ISO:...]]/[[JIS:...]]を捕捉。JIS X 0301のように引数に空白を含むものも拾えるよう、既存BracketLink([!-~]が空白を除外)とは別の正規表現にした。standard_refで scheme 名+引数を空白区切りの平文へ変換(HTML エスケープあり)。test_bracket_linkに ISO/JIS の行を追加。RBS(StandardRef/standard_ref)も追加しsteep checkはクリーン。補足: 従来
[[ISO:8601]]はbracket_linkのelseで literal 再出力、[[JIS:X 0301]]はBracketLinkに match すらせず素通り、という二経路だった。両方をStandardRefに集約した。doctree 側の現行 Markdown ソースは平文へ置換済み(別 PR、rurema/doctree#2173)。
fix #236