Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

空白行を挟んだ書き込みがあると、自分の書き込みと認識されない #1213

Closed
mtasaka opened this issue Aug 2, 2023 · 1 comment · Fixed by #1214
Closed
Labels
bug バグの追跡

Comments

@mtasaka
Copy link
Collaborator

mtasaka commented Aug 2, 2023

https://mao.5ch.net/test/read.cgi/linux/1689151433/302

あたりの議論
確かに c6ab543 だとダメっぽい

多分ですが、62abdbf でダメになったと思われます。元の remove_spaces だと、空白だけの行は空文字になるのに対し、新しい ascii_trim だと、空白だけの行はもとの行をそのまま返すことになっていて、空白の数が違うもの(をどうも一致させないといけないっぽい.. ここは 5ch の仕様なのか良く分からないけど)の2つが一致しない

@mtasaka mtasaka added the bug バグの追跡 label Aug 2, 2023
@mtasaka
Copy link
Collaborator Author

mtasaka commented Aug 2, 2023

いま試していること: if( start == std::string::npos ) return std::string();

mtasaka added a commit to mtasaka/JD that referenced this issue Aug 2, 2023
…ring (JDimproved#1213)

whitespace だけの文字列の入力に対して、その whitespace を全て
正しく除去したものを返すよう修正する。
修正前は、そのような文字列の入力に対しては変更前の文字列を返していたが、
これを空白の文字列を新たに作成し、それを返すよう変更する。

従って、以下の変更を一部修正する。
JDimproved@62abdbf

これに応じて、対応するテストをAsciiTrimTestの中に追加する。

[1] https://mao.5ch.net/test/read.cgi/linux/1689151433/302
ma8ma pushed a commit that referenced this issue Aug 2, 2023
…ring (#1213) (#1214)

whitespace だけの文字列の入力に対して、その whitespace を全て
正しく除去したものを返すよう修正する。
修正前は、そのような文字列の入力に対しては変更前の文字列を返していたが、
これを空白の文字列を新たに作成し、それを返すよう変更する。

従って、以下の変更を一部修正する。
62abdbf

これに応じて、対応するテストをAsciiTrimTestの中に追加する。

[1] https://mao.5ch.net/test/read.cgi/linux/1689151433/302
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug バグの追跡
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant