プロジェクト

全般

プロフィール

Vote #72867

完了

Macros.rb extract_macro_options should use lazy search

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

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

0%

予定工数:
category_id:
26
version_id:
62
issue_org_id:
12451
author_id:
38840
assigned_to_id:
1
comments:
2
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

I am unsure if the design was intended to be greedy, however for my macro I needed a lazy search since it took in a query string like: query=?show_issues=1&show_news=1&show_documents=1&show_files=1&show_wiki_edits=1. The current method matches "query=?show_issues=1&show_news=1&show_documents=1&show_files=1&show_wiki_edits" : "1". When I look for options[:query] it returns nil. By using a lazy search, I get the intended result: "query" : "?show_issues=1&show_news=1&show_documents=1&show_files=1&show_wiki_edits=1"

Perhaps we should be able to specify if greedy or lazy?

I have attached my "quite simple" patch.


journals

Fixed and tests added in r10885, thanks.
--------------------------------------------------------------------------------
Merged in 2.1-stable.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

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

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

いいね!0
いいね!0