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

fix: インラインコードの後にスペースを強制する処理が正常に動作していない不具合を修正 #26

Merged
merged 2 commits into from
May 5, 2021

Conversation

book000
Copy link
Contributor

@book000 book000 commented May 5, 2021

textlint-rule-ja-space-around-code にて、after: true を設定したうえでインラインコードの後にスペースを入れなくてもエラーが発生しない問題を修正しました。

isJapaneseChar で調べている変数が正しくないために発生しているようです。

よろしくお願いいたします。

@azu
Copy link
Member

azu commented May 5, 2021

ありがとうございます。
https://github.com/textlint-ja/textlint-rule-preset-ja-spacing/blob/master/packages/textlint-rule-ja-space-around-code/test/index-test.js にテストも追加できますか?

        {
            text: "これは`code`おかしい",
            output: "これは`code` おかしい",
            options: {
                before: false,
                after: true
            },
            errors: [
                {
                    message: "インラインコードの後にスペースを入れてください。",
                    index: 10
                }
            ]
        },

みたいな感じですかね?

@book000
Copy link
Contributor Author

book000 commented May 5, 2021

テストコードを追加しました。index: 10 だとテストが通らなかったので、 index: 9 に修正してあります。

@azu azu changed the title fix: インラインコードの前にスペースを強制する処理が正常に動作していない不具合を修正 fix: インラインコードの後にスペースを強制する処理が正常に動作していない不具合を修正 May 5, 2021
@azu azu merged commit 02573de into textlint-ja:master May 5, 2021
@azu
Copy link
Member

azu commented May 5, 2021

ありがとうございます!
https://github.com/textlint-ja/textlint-rule-preset-ja-spacing/releases/tag/v2.1.1 リリースしました

@book000
Copy link
Contributor Author

book000 commented May 5, 2021

こちらこそありがとうございました!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants