Skip to content

Commit

Permalink
Display unit for input param only if it is type Real or std::vector<R…
Browse files Browse the repository at this point in the history
…eal>. Refs idaholab#27352 and idaholab#29115.
  • Loading branch information
gambka committed Nov 21, 2024
1 parent 8a5faa9 commit a5484ff
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions python/MooseDocs/extensions/appsyntax.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,13 +772,14 @@ def createMaterialize(self, parent, token, page):
html.Tag(p, 'span', string='C++ Type:')
html.String(p, content=cpp_type, escape=True)

doc_unit = param['doc_unit']
p = html.Tag(body, 'p', class_='moose-parameter-description-doc-unit')
html.Tag(p, 'span', string='Unit:')
if not doc_unit:
html.String(p, content='(no unit assumed)')
else:
html.String(p, content=doc_unit)
if cpp_type == "double" or cpp_type == "std::vector<double>":
doc_unit = param['doc_unit']
p = html.Tag(body, 'p', class_='moose-parameter-description-doc-unit')
html.Tag(p, 'span', string='Unit:')
if not doc_unit:
html.String(p, content='(no unit assumed)')
else:
html.String(p, content=doc_unit)

if param['options']:
p = html.Tag(body, 'p', class_='moose-parameter-description-options')
Expand Down

0 comments on commit a5484ff

Please sign in to comment.