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

Markdown, Italic, not working with some special UTF characters #12319

Closed
tassoman opened this issue Nov 12, 2023 · 7 comments
Closed

Markdown, Italic, not working with some special UTF characters #12319

tassoman opened this issue Nov 12, 2023 · 7 comments
Labels
⚠️bug? This might be a bug

Comments

@tassoman
Copy link
Contributor

tassoman commented Nov 12, 2023

💡 Summary

If you write words around * asterisks, you can get italic output, by MFM. *like this*

🥰 Expected Behavior

as user I would like to write italic MFM

🤬 Actual Behavior

When the text have ' or à è ì ò ù and other UTF codes, italic breaks, but bold works.

Screenshot 2023-11-12 at 14-10-54 BETA Misskey Social

Screenshot 2023-11-12 at 14-11-17 BETA Misskey Social

📝 Steps to Reproduce

  1. open note composition modal window
  2. digit this text
*La felicità*
e
*L'ottimismo*
invece
**La felicità**
e
**L'ottimismo**
oppure
*il corsivo*

Finally, publish the note

💻 Frontend Environment

* Model and OS of the device(s): any
* Browser: firefox 119.0.1
* Server URL: https://beta.misskey.social/notes/9lz264qruaoc002i
* Misskey: 2023.11.0

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service: docker master
* Misskey: 2023.11.0
@tassoman tassoman added the ⚠️bug? This might be a bug label Nov 12, 2023
@samunohito
Copy link
Member

https://github.com/misskey-dev/mfm.js/blob/develop/docs/syntax.md
上記のMFMのドキュメントを見る限り、アスタリスクは[a-zA-Z0-9 \t]にマッチする文字にしか対応しないようです。

'à è ì ò ù等のUnicode文字を斜体にするには、アスタリスクの代わりに<i></i>を使用する必要があります。

<i>La felicità</i>
<i>L'ottimismo</i>

image

@tassoman
Copy link
Contributor Author

わかりました、なぜboldでも大丈夫ですか? 🤔

@samunohito
Copy link
Member

残念ながら私も知りません…
確かなのは、それが仕様に記載されており、そのとおりに動作するということです。

@yuriha-chan
Copy link
Contributor

yuriha-chan commented Nov 13, 2023

The following is only my speculation:
Generally, italic (or precisely oblique) fonts are not much used in Japanese text because they are not very beautiful. Since Japanese text is not separated by spaces, it is difficult to tell whether the "*`" symbol is used as a normal symbol or as italic markup. So it is designed so that only the Roman alphabets are subject to italics in this syntax to reduce frustration of Japanese speaking users.
Therefore, as you suggested, the exclusion of Unicode alphabet characters is a bug which should be corrected.

以下は推測になります。
一般的に、日本語ではitalic(というよりoblique)表示があまり美しくないのであまり使わない上に、スペースで分かち書きしないので、*が普通の記号かマークアップか分からず、ユーザーの意図に反してイタリックと判定される恐れがあるため、この構文ではローマ字アルファベットにのみ斜体の対象にしているのだと思います。
ご指摘のとおり、Unicodeのアルファベットが除外されているのは修正すべきバグだと思います。

@tassoman
Copy link
Contributor Author

英語でのコメントありがとうございます。
obliqueとboldは同じ動作をするはずです。
マークダウンは完全に尊重されなければならない。

Thanks for your english comment, I think, bold and italic should have same behaviour.
It should be a complete Markdown implementation.

@samunohito
Copy link
Member

これは Misskey 自体の問題というよりも、mfm.js の問題と呼ぶ方が適切でしょう。
以下のリポジトリに問題点を登録していただくことで、より確実な改善が期待できると思います。
https://github.com/misskey-dev/mfm.js

It would be more appropriate to call this an issue with mfm.js rather than an issue with Misskey itself.
We believe that you can expect more reliable improvements by registering issues in the repository below.
https://github.com/misskey-dev/mfm.js

@tassoman
Copy link
Contributor Author

Re issued misskey-dev/mfm.js#134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️bug? This might be a bug
Projects
None yet
Development

No branches or pull requests

3 participants