Repository navigation
mfm.js 0.28.0 との差分解消(Unicode 絵文字の分類・ネスト予算) - #37
Merged
LibraryLibrarian merged 4 commits intoNov 21, 2026
Merged
Conversation
RGI 由来の正規表現から、mfm.js が使う @misskey-dev/emoji-data 17.0.3 の emojiRegex へ置き換えた。 単独の regional indicator と U+E50A を絵文字にし、装飾なしの ©®™♟ は絵文字にしない。 VS16 付きの絵文字(⚡️ など)は VS16 まで含めて 1 ノードにする。 Co-Authored-By: Claude <noreply@anthropic.com>
入力ごとに input.length * 20 + 1000 回までネスト構文を試し、尽きた後はテキストとして扱う。 nest() とハッシュタグ・URL の括弧のネストで消費する。 Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <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.
概要
mfm.js 0.28.0 / Misskey 2026.11.0 との比較で見つかった差のうち、Unicode 絵文字の分類とネスト予算を解消。
Unicode 絵文字の分類
@misskey-dev/emoji-data17.0.3 のemojiRegexへ置き換え。UnicodeEmojiNodeに変更。装飾なしの ©®™♟ は絵文字にしない(VS16 付きは絵文字)。⚡️⭐️など VS16 付きの 9 文字は VS16 まで 1 ノードに含める。U+26F7 + 肌色修飾子も 1 絵文字。third_party/のライセンス表示を差し替え。ネスト予算
nestBudget(input.length * 20 + 1000)を追加。MfmParser.build()の最上位パーサーがパースごとに初期化。nest()と、ハッシュタグ・URL の括弧内の各要素(終端の試行を含む)で消費。尽きた後のネスト構文はテキスト扱い。nestLimit: 100で'https://a(' * 100 + ' z **tail** #a(b(c))'を本家と同じ結果(末尾が hashtaga+ text(b(c)))になることを確認。対応していない項目
before\n**bold** search\nafterの差は Issue search が行頭チェックを持たず、全インライン構文より優先される #3 の意図的な逸脱のため対象外。確認
dart test(827 件)・dart analyze成功。[Unreleased]を更新。