Skip to content

Commit

Permalink
Fix(frontend): MFMでfgとbgに長い単語を使うと改行されない問題を修正 (#12819)
Browse files Browse the repository at this point in the history
* MFMでfgとbgに長い単語を使うと改行されない問題を修正

* update CHANGELOG.md
  • Loading branch information
1Step621 authored Dec 27, 2023
1 parent 9d5fc4c commit 2a5c9e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
### Client
- Fix: 一部のモデログ(logYellowでの表示対象)について、表示の色が変わらない問題を修正
- Feat: AiScript専用のMFM構文`$[clickable.ev=EVENTNAME ...]`を追加。`Mk:C:mfm`のオプション`onClickEv`に関数を渡すと、クリック時に`EVENTNAME`を引数にして呼び出す
- Fix: `fg`/`bg`MFMに長い単語を指定すると、オーバーフローされずはみ出る問題を修正

### Server
- Enhance: センシティブワードの設定がハッシュタグトレンドにも適用されるようになりました
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,13 @@ export default function(props: MfmProps, context: SetupContext<MfmEvents>) {
case 'fg': {
let color = token.props.args.color;
if (!/^[0-9a-f]{3,6}$/i.test(color)) color = 'f00';
style = `color: #${color};`;
style = `color: #${color}; overflow-wrap: anywhere;`;
break;
}
case 'bg': {
let color = token.props.args.color;
if (!/^[0-9a-f]{3,6}$/i.test(color)) color = 'f00';
style = `background-color: #${color};`;
style = `background-color: #${color}; overflow-wrap: anywhere;`;
break;
}
case 'ruby': {
Expand Down

0 comments on commit 2a5c9e6

Please sign in to comment.