Skip to content

Conversation

@YuminosukeSato
Copy link
Contributor

@YuminosukeSato YuminosukeSato commented Jul 24, 2025

概要

見出し内の太字記号(**text**__text__)を検出し、削除を提案する機能をno-ai-emphasis-patternsルールに追加しました。
#23

背景

AIが生成する文章では、見出しに太字を使用するパターン(例:# **重要なお知らせ**)がよく見られます。しかし、Markdownでは見出し自体が強調要素であるため、追加の太字は冗長です。

変更内容

  • no-ai-emphasis-patterns.ts[Syntax.Heading]ハンドラーを追加
  • 見出し内の太字パターン(**__の両方)を検出
  • 自動修正(fixer)機能で太字記号を削除
  • 新しいオプションdisableHeadingEmphasisPatternsを追加

検出例

# **太字の見出し**
## これは**太字**を含む見出し
### __アンダースコア__で囲まれた太字

これらは以下のように修正されます。

# 太字の見出し
## これは太字を含む見出し
### アンダースコアで囲まれた太字

テスト

  • 見出し内太字の検出テストを追加
  • オプションによる無効化のテストを追加
  • 既存の機能への影響がないことを確認

Breaking Changes

なし(新機能の追加のみ)

@azu azu added the Type: Feature New Feature label Jul 24, 2025
Copy link
Member

@azu azu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@azu
Copy link
Member

azu commented Jul 24, 2025

git hookが効いてないみたいで、formatterがかかってなさそうでしたので修正
c9509a4

@azu azu merged commit 1f76cfe into textlint-ja:main Jul 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants