Actions
Defect #32477
closedRight-aligned TOC tag is displayed in exported PDF if the text formatting setting is Markdown
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Hello,
If we have a right toc :
{{>toc}}
In a wiki page on REDMINE with text formatting markdown.
The toc
{{>toc}}
Appear in the PDF
No problem for left toc.
Thanks
Files
Related issues
Updated by Go MAEDA almost 5 years ago
- Category changed from Wiki to PDF export
- Status changed from New to Confirmed
Updated by Go MAEDA almost 5 years ago
- Related to Defect #16236: Right-aligned table of contents (TOC) not working with markdown added
Updated by Yuichi HARADA almost 5 years ago
I modified the regular expression with reference to TOC_RE of app/helpers/application_helper.rb .
I confirmed that {{toc}}
, {{<toc}}
and {{>toc}}
do not export to PDF.
diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb
index c8189367b..0adcb18c7 100644
--- a/lib/redmine/export/pdf.rb
+++ b/lib/redmine/export/pdf.rb
@@ -92,7 +92,7 @@ module Redmine
</style>'
# Strip {{toc}} tags
- txt = txt.gsub(/<p>\{\{([<>]?)toc\}\}<\/p>/i, '')
+ txt = txt.gsub(/<p>\{\{((<|<)|(>|>))?toc\}\}<\/p>/i, '')
writeHTMLCell(w, h, x, y, css_tag + txt, border, ln, fill)
end
Updated by Go MAEDA almost 5 years ago
- Target version set to Candidate for next minor release
Updated by Go MAEDA almost 5 years ago
- Target version changed from Candidate for next minor release to 4.0.7
Setting the target version to 4.0.7.
Updated by Go MAEDA almost 5 years ago
- Status changed from Confirmed to Resolved
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch.
Updated by Go MAEDA almost 5 years ago
- Status changed from Resolved to Closed
- Target version changed from 4.0.7 to 4.1.1
Updated by Go MAEDA almost 5 years ago
- Subject changed from Export PDF of WikiPage in Markdown Format with right toc to Right-aligned TOC tag is displayed in exported PDF if the text formatting setting is Markdown
Actions