プロジェクト

全般

プロフィール

Vote #64736

未完了

trac import breaks images

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

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Importers_15
対象バージョン:
-
開始日:
2009/02/24
期日:
進捗率:

0%

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

説明

[[Image(myimage.png)]]
and similar should be converted to
!myimage.png!

journals

The following regexp, should be placed first in the convert_wiki_text block:

<pre>
text = text.gsub(/\[\[Image\(([a-zA-Z]+\:(\d+\:)?)?([^\)^,]+)[^\)]*\)\]\]/, '!\3!')
</pre>

The following test cases:

puts convert_wiki_text("&#91;&#91;Image(myimage1.png)&#93;&#93;")
puts convert_wiki_text("&#91;&#91;Image(wiki:myimage2.png)&#93;&#93;")
puts convert_wiki_text("&#91;&#91;Image(ticket:1:myimage3.png)&#93;&#93;")
puts convert_wiki_text("&#91;&#91;Image(myimage4.png, 120px)&#93;&#93;")
puts convert_wiki_text("&#91;&#91;Image(myimage5.png, align=right)&#93;&#93;")

Will then output:
<pre>
!myimage1.png!
!myimage2.png!
!myimage3.png!
!myimage4.png!
!myimage5.png!
</pre>

I think the only supported extended Image attribute supported by Redmine is align=right, which could have been converted to:
<pre>!>myimage5.png!</pre>
...but it's probably pretty rare, and would make the already complex regexp almost unreadable.
--------------------------------------------------------------------------------
Any news on this?
Is anyone able to reproduce this with the current trunk?
--------------------------------------------------------------------------------

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

  • カテゴリImporters_15 にセット

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

いいね!0
いいね!0