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

Italic text is not recognized when "/" is present inside #102

Open
outloudvi opened this issue Mar 17, 2022 · 11 comments
Open

Italic text is not recognized when "/" is present inside #102

outloudvi opened this issue Mar 17, 2022 · 11 comments

Comments

@outloudvi
Copy link

  • Normal case: *a*
[{"type":"italic","children":[{"type":"text","props":{"text":"a"}}]}]
  • Problematic case: *a/n*
[{"type":"text","props":{"text":"*a/n*"}}]
  • Expected: *a/n*
[{"type":"italic","children":[{"type":"text","props":{"text":"a/n"}}]}]
@marihachi
Copy link
Contributor

marihachi commented Mar 17, 2022

仕様通りの動作です。これはバグではありません。
もしこの動作を変更する場合は、その変更内容を検討してMFM自体の仕様を変更することになります。

@outloudvi
Copy link
Author

I think it would be okay if it is - as you said - per the MFM spec (please correct me if I had it wrong since I don't know much about Japanese). Also, I can wrap italic text with <i> which will not suffer from this problem.

I just feel it a little weird because it does not affect the bold notation:

// *a/b*
[{"type":"text","props":{"text":"*a/b*"}}]
// **a/b**
[{"type":"bold","children":[{"type":"text","props":{"text":"a/b"}}]}]

@Johann150
Copy link
Contributor

I agree that the current behaviour is very unexpected (and might thus be considered a bug). I personally consider the current behaviour for **bold** to be correct, so I think we should make the characters allowed inside *italic* the same as allowed in <i>italic</i>. (But *italic* should still require white space around it to be recognized.) Alternatively, we could remove the star-italic all together but that is not a good idea for backward compatibility.

(I did not quite understand; is the MFM specification somewhere else? Where would it have to be changed, since you said that "MFM itself has to be changed". Maybe that is just my translator not working correctly.)

@marihachi
Copy link
Contributor

@Johann150
以下にmfm.jsを実装するために作成された仕様があります。
https://github.com/misskey-dev/mfm.js/blob/develop/docs/syntax.md

@ThatOneCalculator
Copy link

Any update on this?

@outloudvi
Copy link
Author

Any update on this?

@ThatOneCalculator Per marihachi, it seems to be expected rather than a bug:

仕様通りの動作です。これはバグではありません。

A workaround is to use <i>text</i> as instructed by the MFM docs.

@ThatOneCalculator
Copy link

I personally disagree, as this isn't the behavior of other standard markdown parsers and confuses users.

@tassoman
Copy link

tassoman commented Nov 24, 2023

I join the discussion to say actual behaviour, I described into #134, it's confusing for people writing Latin / European languages.

Although in this repository MFM is never addressed as Markdown For Misskey in the source code, or documentation, neither when the repository was renamed #30 (2021/03).

I want to note that since 2021/09 the Misskey.io Wiki Pages are claiming MFM is Markdown For Misskey, and not a different thing, for example Markup For Misskey.

This is the origin of confusion. Since the beginning, people expect to have markdown into Misskey. At least a basic subset, made of bold, oblique, links and quote. (No support for bullet / numbered lists)

So I end up asking for oblique text rendering to be fixed. Please.

@ThatOneCalculator
Copy link

The Firefish project will be addressing this in libmfm

@tassoman
Copy link

That software can't be used in this project because is lacking of a free software license compatible with AGPLv3.
If your code incorporated misskey-dev/mfm.js code, it must be released at least under MIT license or kept private.

@ThatOneCalculator
Copy link

The idea is it to be an alternative implementation to mfm.js.

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

No branches or pull requests

5 participants