Revision 1297:0a574315af3e lib/redmine
| lib/redmine/export/pdf.rb | ||
|---|---|---|
| 109 | 109 |
RDMPdfEncoding::rdm_from_utf8(txt, l(:general_pdf_encoding)) |
| 110 | 110 |
end |
| 111 | 111 |
|
| 112 |
def formatted_text(text) |
|
| 113 |
html = Redmine::WikiFormatting.to_html(Setting.text_formatting, text) |
|
| 114 |
# Strip {{toc}} tags
|
|
| 115 |
html.gsub!(/<p>\{\{([<>]?)toc\}\}<\/p>/i, '')
|
|
| 116 |
html |
|
| 117 |
end |
|
| 118 |
|
|
| 112 | 119 |
def RDMCell(w ,h=0, txt='', border=0, ln=0, align='', fill=0, link='') |
| 113 | 120 |
Cell(w, h, fix_text_encoding(txt), border, ln, align, fill, link) |
| 114 | 121 |
end |
| ... | ... | |
| 120 | 127 |
def RDMwriteHTMLCell(w, h, x, y, txt='', attachments=[], border=0, ln=1, fill=0) |
| 121 | 128 |
@attachments = attachments |
| 122 | 129 |
writeHTMLCell(w, h, x, y, |
| 123 |
fix_text_encoding( |
|
| 124 |
Redmine::WikiFormatting.to_html(Setting.text_formatting, txt)), |
|
| 130 |
fix_text_encoding(formatted_text(txt)), |
|
| 125 | 131 |
border, ln, fill) |
| 126 | 132 |
end |
| 127 | 133 |
|
| lib/redmine/version.rb | ||
|---|---|---|
| 4 | 4 |
module VERSION #:nodoc: |
| 5 | 5 |
MAJOR = 2 |
| 6 | 6 |
MINOR = 2 |
| 7 |
TINY = 0
|
|
| 7 |
TINY = 4
|
|
| 8 | 8 |
|
| 9 | 9 |
# Branch values: |
| 10 | 10 |
# * official release: nil |
| lib/redmine/wiki_formatting/macros.rb | ||
|---|---|---|
| 147 | 147 |
unless block_given? |
| 148 | 148 |
raise "Can not create a macro without a block!" |
| 149 | 149 |
end |
| 150 |
name = name.to_sym if name.is_a?(String)
|
|
| 150 |
name = name.to_s.downcase.to_sym
|
|
| 151 | 151 |
available_macros[name] = {:desc => @@desc || ''}.merge(options)
|
| 152 | 152 |
@@desc = nil |
| 153 |
Definitions.send :define_method, "macro_#{name}".downcase, &block
|
|
| 153 |
Definitions.send :define_method, "macro_#{name}", &block
|
|
| 154 | 154 |
end |
| 155 | 155 |
|
| 156 | 156 |
# Sets description for the next macro to be defined |
| lib/redmine/wiki_formatting/textile/formatter.rb | ||
|---|---|---|
| 69 | 69 |
l = 1 |
| 70 | 70 |
started = false |
| 71 | 71 |
ended = false |
| 72 |
text.scan(/(((?:.*?)(\A|\r?\n\s*\r?\n))(h(\d+)(#{A}#{C})\.(?::(\S+))? (.*?)$)|.*)/m).each do |all, content, lf, heading, level|
|
|
| 72 |
text.scan(/(((?:.*?)(\A|\r?\n\s*\r?\n))(h(\d+)(#{A}#{C})\.(?::(\S+))?[ \t](.*?)$)|.*)/m).each do |all, content, lf, heading, level|
|
|
| 73 | 73 |
if heading.nil? |
| 74 | 74 |
if ended |
| 75 | 75 |
after << all |
Also available in: Unified diff