入力文字列に^M(CR)が混在していると変換に失敗する問題を修正 (Issue #152)#153
Open
kiyoka wants to merge 1 commit into
Open
Conversation
sumibi-escape-for-json が復帰文字 (CR / ^M / U+000D) をエスケープして いなかったため、生の制御文字が JSON 文字列リテラル中に残り、リクエストが 不正な JSON になって変換に失敗していた (!!TIMEOUT ERROR!!)。 \r を \\r にエスケープする処理を追加し、有効な JSON を生成するようにした。 CR/CRLF のエスケープ、既存動作の回帰、JSON 妥当性を検証する ERT テストを 追加し、Makefile の test ターゲットに組み込んだ。 Co-Authored-By: Claude Opus 4.8 <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.
概要
Issue #152 で報告された、入力文字列に
^M(CR / U+000D) が混在していると変換が!!TIMEOUT ERROR!!で失敗する問題を修正します。Closes #152
原因
sumibi-escape-for-json(lisp/sumibi.el) が、JSON へエスケープする際に復帰文字 (CR /^M/ U+000D) を処理していませんでした。\n)・タブ (\t) はエスケープしていた\rはそのまま素通りし、生の制御文字が JSON 文字列リテラル中に残る!!TIMEOUT ERROR!!修正内容
sumibi-escape-for-jsonに\r→\\rのエスケープ処理を追加test/sumibi-escape-json-test.el)testターゲットに新テストを組み込み検証結果
M-x check-parensで括弧整合 OKmake test全テストパス(既存への影響なし)🤖 Generated with Claude Code