プロジェクト

全般

プロフィール

Vote #80716

未完了

Macro argument escaping/quoting mechanism

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

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

0%

予定工数:
category_id:
26
version_id:
0
issue_org_id:
33073
author_id:
12098
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Currently there is no way to enter a macro argument including e.g. comma (@,@), which is always treated as an argument separator - see source:trunk/lib/redmine/wiki_formatting/macros.rb#L41. This effectively prevents using e.g. the @thumbnail@ macro for some images when renaming attachments is not an option. We'll be happy to submit a patch once there is some agreement on how to approach this.

Suggestion:

  • Allow double quotes for argument value delimiting.
  • No quotes = old behavior.
  • Special characters within quotes can be encoded as HTML entities (similarly to @name="value"@ HTML element attributes).

Makes sense?

Rationale:

  • @!@ turns off Redmine-interpreted text formatting constructs - but probably not suitable within the constructs.
  • Text formatting docs say e.g. double quotes can be used when version name contains spaces
  • Users tend to use double quotes anyway, e.g. @
    マクロ thumbnail の実行中にエラーが発生しました (添付ファイル foo.jpg が見つかりません)
    @ and they hardly realize that the quotes actually become part of the argument value.
  • When I have a version called @My "Version"@, I can refer to it as @version:"My "Version""@ within Textile. Does not work with Markdown though.

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

  • カテゴリText formatting_26 にセット

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

いいね!0
いいね!0