プロジェクト

全般

プロフィール

Vote #72191

完了

Wiki diff doesn't keep spaces

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

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

0%

予定工数:
category_id:
1
version_id:
127
issue_org_id:
11359
author_id:
58128
assigned_to_id:
1
comments:
4
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
52
ステータス-->[Closed]

説明

Wiki diff page generates the following HTML:

...
sleep 10
end ...

From: http://www.redmine.org/projects/redmine/wiki/HowTo_run_Redmine_as_a_Windows_service_%28win32-service_+_taskill_approach%29/diff?version=3&version_from=2&commit=View+differences

And here is @div.text-diff@ style:

.text-diff {
padding: 1em;
background-color:#f6f6f6;
color:#505050;
border: 1px solid #e4e4e4;
}

From: source:tags/2.0.3/public/stylesheets/application.css#L777

Spaces in Wiki page are ignored because the HTML doesn't use @<pre>@ tag and the CSS also doesn't use @white-space: pre@.


journals

Here is a patch that removes @simple_format_without_paragraph@ and surrounds @@diff.to_html@ with @&lt;pre class="text-diff">@ instead of @&lt;div class="text-diff">@.
--------------------------------------------------------------------------------
*Before:*
!{width: 355px; border: 1px solid #ccc;}.11359-before@2x.png!

*After:*
!{width: 355px; border: 1px solid #ccc;}.11359-after@2x.png!
--------------------------------------------------------------------------------
I think it would be better to add @white-space: pre-wrap;@ to @text-diff@ class.

<pre><code class="diff">
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index c680fac92..e5224dca5 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -1073,6 +1073,7 @@ button.tab-left.disabled, button.tab-right.disabled {
background-color:#f6f6f6;
color:#505050;
border: 1px solid #e4e4e4;
+ white-space: pre-wrap;
}

/***** Wiki *****/
</code></pre>

Please see the following screenshots. Without @white-space: pre-wrap;@, you cannot see the whole content of long lines.

*Without @pre-wrap@:*
!{width: 900px; border: 1px solid #ccc;}.without-pre-wrap@2x.png!

*With @pre-wrap@:*
!{width: 900px; border: 1px solid #ccc;}.with-pre-wrap@2x.png!

--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------

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

  • カテゴリWiki_1 にセット
  • 対象バージョン4.1.0_127 にセット

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

いいね!0
いいね!0