前の日 / 次の日 / 最新 / 2017-07

XINUJP - ChangeWebLog / 2017-07-05

01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

2024 : 01 02 03 04 05 06 07 08 09 10 11 12
2023 : 01 02 03 04 05 06 07 08 09 10 11 12
2022 : 01 02 03 04 05 06 07 08 09 10 11 12
2021 : 01 02 03 04 05 06 07 08 09 10 11 12
2020 : 01 02 03 04 05 06 07 08 09 10 11 12
2019 : 01 02 03 04 05 06 07 08 09 10 11 12
2018 : 01 02 03 04 05 06 07 08 09 10 11 12
2017 : 01 02 03 04 05 06 07 08 09 10 11 12
2016 : 01 02 03 04 05 06 07 08 09 10 11 12
2015 : 01 02 03 04 05 06 07 08 09 10 11 12
2014 : 01 02 03 04 05 06 07 08 09 10 11 12
2013 : 01 02 03 04 05 06 07 08 09 10 11 12
2012 : 01 02 03 04 05 06 07 08 09 10 11 12
2011 : 01 02 03 04 05 06 07 08 09 10 11 12
2010 : 01 02 03 04 05 06 07 08 09 10 11 12
2009 : 01 02 03 04 05 06 07 08 09 10 11 12
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12

2017-07-05 Wed

Redmine 2.5 markdown テーブル内の改行 [redmine]

Redmine markdown のテーブル内で改行する方法。
幾つかの方法があるらしいが、ここを参照して無事に設定できた。

http://qiita.com/HideakiSaito/items/e08e3f7eb50d24fa9722

- 設定
$REDMINE_HOME/lib/redmine/wiki_formatting/macros.rb

       # Builtin macros
       desc "Sample macro."
       macro :hello_world do |obj, args, text|
         h("Hello world! Object: #{obj.class.name}, " +
           (args.empty? ? "Called with no argument" : "Arguments: #{args.join(', ')}") +
           " and " + (text.present? ? "a #{text.size} bytes long block of text." : "no block of text.")
         )
       end
 
+ desc "br."
+ macro :br do |obj, args|
+ raw "<br>"
+ end
+
       desc "Displays a list of all available macros, including description if available."
       macro :macro_list do |obj, args|
         out = ''.html_safe
         @@available_macros.each do |macro, options|
           out << content_tag('dt', content_tag('code', macro.to_s))
           out << content_tag('dd', textilizable(options[:desc]))
         end
         content_tag('dl', out)
       end


- 使いかた
改行したいところへ { { br } } を記述

|h1 |h2 |
|---|---|
|d1 { { br } } d1|d2|

最終更新時間: 2025-01-14 10:03