プロジェクト

全般

プロフィール

Vote #77450

完了

Change the value of "pre" button in Markdown toolbar from "~~~" to "```"

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Text formatting_26
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
26
version_id:
99
issue_org_id:
22843
author_id:
19622
assigned_to_id:
332
comments:
8
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

When using the @pre@ button in the web editor to insert a pre-formatted code block for a project which uses Markdown formatting, the lines inserted contain "@~~~@", which does not work in Markdown. It should insert lines "@```@" instead (possibly also preceded and followed by an empty line, not sure).

Very easy to reproduce: in a Markdown project, add an entry, press the "pre" button, click on "Preview". The resulting page shows "~~~" instead of a proper code block.


journals

'~~~' is also correct Markdown and works as expected on my environment.

http://spec.commonmark.org/0.25/#code-fence
--------------------------------------------------------------------------------
I made a long name plugin.

https://www.redmine.org/plugins/redmine_github_style_fenced_code_block

Certainly triple tildes are not wrong syntax, but most people are using triple back quotes.
So, it is one of the features of markdown that the readability is high even for raw data. However, the triple tildea is similar to the strike (double tilde) syntax, and it is less readable. If it is a triple backquote, it can be distinguished from a strike. In addition, since it is similar in syntax to inline code (single backquote), the format of the document is consistent.

I think that the input of the markdown toolbar should be changed to triple backquote.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Taiki IKEGAME wrote:
> Certainly triple tildes are not wrong syntax, but most people are using triple back quotes.

I agree with you, I feel "```" is much more popular than "~~~". To be honest, I have not seen "~~~" other than Redmine.

I wrote a patch to use "```" instead of "~~~". I suggest including this change in the future release. Setting target version to 4.1.0.

--------------------------------------------------------------------------------
@Maeda-san Thank you so much!
--------------------------------------------------------------------------------
I will commit this change within a few days. Feedback welcome.
--------------------------------------------------------------------------------
Go MAEDA wrote:
> I will commit this change within a few days. Feedback welcome.

I'm in favour of making this change.
--------------------------------------------------------------------------------
Committed.
--------------------------------------------------------------------------------


related_issues

blocks,Closed,25299,Markdown pre-block could derive incorrect wiki sections

Admin Redmine さんが約4年前に更新

  • カテゴリText formatting_26 にセット
  • 対象バージョン4.0.0_99 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0