Opened 8 years ago
Closed 8 years ago
#12522 closed defect (fixed)
Multiline option documentation is rendered as a oneliner
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.12 |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
|
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Option documentation such as [logging]
log_format
contains markup that should be rendered as multiple lines: tags/trac-1.0.11/trac/env.py#L241.
With a minor change, the text could be rendered as multi-line.
-
trac/htdocs/css/wiki.css
diff --git a/trac/htdocs/css/wiki.css b/trac/htdocs/css/wiki.css index 722d7c4..5434503 100644
a b div.tracini td.nodefault { 119 119 font-style: italic; 120 120 white-space: nowrap; 121 121 } 122 div.tracini td p { margin: 0 } -
trac/wiki/macros.py
diff --git a/trac/wiki/macros.py b/trac/wiki/macros.py index 450393d..8c4ff8a 100644
a b class TracIniMacro(WikiMacroBase): 807 807 format_to_html(self.env, formatter.context, section_doc), 808 808 tag.table(class_='wiki')(tag.tbody( 809 809 tag.tr(tag.td(tag.code(option.name)), 810 tag.td(format_to_ oneliner(self.env, formatter.context,811 810 tag.td(format_to_html(self.env, formatter.context, 811 option.doc)), 812 812 default_cell(option), 813 813 class_='odd' if idx % 2 else 'even') 814 814 for idx, option in
Attachments (2)
Change History (6)
by , 8 years ago
Attachment: | Screen Shot 2016-06-29 at 17.44.31.png added |
---|
by , 8 years ago
Attachment: | Screen Shot 2016-06-29 at 17.44.13.png added |
---|
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
comment:3 by , 8 years ago
That looks good to me. IniAdminPlugin renders the documents using wiki_to_html
at source:iniadminplugin/0.11/iniadmin/templates/iniadmin.html@13607:50#L21.
trac/htdocs/css/wiki.css
diff --git a/trac/htdocs/css/wiki.css b/trac/htdocs/css/wiki.css index 722d7c4..5434503 100644
a b div.tracini td.nodefault { 119 119 font-style: italic; 120 120 white-space: nowrap; 121 121 } 122 div.tracini td p { margin: 0 }
I think it might be good to use 0-margin for first and last paragraphs.
div.tracini td > p:first-child { margin-top: 0 } div.tracini td > p:last-child { margin-bottom: 0 }
In my environment, I use 0-margin for first and last children in table cell like this.
table.wiki th > :first-child, table.wiki td > :first-child { margin-top: 0 } table.wiki th > :last-child, table.wiki td > :last-child { margin-bottom: 0 }
If the change is made, we may want to consider a small margin between paragraphs, and reformatting some of the option documentation. The latter point may make the change more suitable for 1.2 since changes to option documentation would require updates to l10n catalogs, and should be minimized to prevent extra work for translators.