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, 数式,アイコンの展開がされない #9546

Open
y5000x opened this issue Jan 14, 2025 · 1 comment
Open

Comments

@y5000x
Copy link

y5000x commented Jan 14, 2025

Environment

Host

item version
OS Windows 11
GROWI 7.0.21
node.js 20.18.0
npm 10.8.2
yarn 1.22.22
Using Docker yes
Using growi-docker-compose yes

(Accessing https://{GROWI_HOST}/admin helps you to fill in above versions)

Client

item version
OS Windows 11
browser Firefox 134.0

How to reproduce? (再現手順)

Wikiページに以下のコードで再現可能

OKの場合

<div class="alert alert-primary" role="alert">

$ ax^5 + bx^4 + cx^3 + dx^2 + ex + f $
- :wrench:OK:wrench: 
- あああ
</div>

NGの場合

<div class="alert alert-primary" role="alert">
$ ax^5 + bx^4 + cx^3 + dx^2 + ex + f $
- :wrench:NG:wrench: 
- あああ
</div>

<a class="btn btn-primary text-white" data-bs-toggle="collapse" href="#collapse-1">
  コンテンツを表示する
</a>
<div class="collapse" id="collapse-1">
  <div class="card card-body">
$ ax^5 + bx^4 + cx^3 + dx^2 + ex + f $
- :wrench:NG:wrench: 
- あああ
  </div>
</div>

What happens? (症状)

  • タグのinnerHTML部分の開始行に正規表現 ^[\s\t]*$ で示せる行を与えると正常にmarkdownが展開されるが、それ以外は展開されずテキスト表示となる

What is the expected result? (期待される動作)

  • 正常にmarkdownが変換されること

Note

  • issue #235と同じ現象?
@yuki-takei
Copy link
Member

yuki-takei commented Jan 17, 2025

@y5000x ご相談いただいた内容は #235 と全く同一ではないですが Markdown レンダリングエンジン起因の症状という意味では似たものになります。

GROWI 最新の v7 系で採用しているエンジンは remark なのですが、HTML タグで囲った場合にはご提示いただいた「OKの場合」のように空行を挟む必要があります。(管理画面のマークダウン設定の Line Break オプション設定次第で挙動が変わる可能性があります)

その他にも、スペース4つ以上を行頭に置いたインデントは Markdown 的には特別な意味を持つのでこれも期待されるレンダリング結果にならない要因となります。

そのため、申し訳ないですが「仕様」という結論になってしまうかと思います。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants