Skip to content

Commit

Permalink
Merge pull request #388 from gcrabbe/colon-spaces
Browse files Browse the repository at this point in the history
Remove space before colons
  • Loading branch information
JasperCraeghs authored Sep 25, 2024
2 parents 295dfcc + dfecb19 commit e513981
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mlx/traceability/directives/item_attribute_directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def perform_replacement(self, app, collection):
attr = TraceableItem.defined_attributes[self['id']]
header = attr.name
if attr.caption:
header += ' : ' + attr.caption
header += ': ' + attr.caption
else:
header = self['id']
top_node = self.create_top_node(header)
Expand Down
2 changes: 1 addition & 1 deletion mlx/traceability/traceable_base_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def _get_caption_info(self, item_info):
hidden_node = nodes.inline('', item_info.identifier)
hidden_node['classes'].append('popup_caption')
elif not self.get('nocaptions'):
display_text = '{0.identifier} : {0.caption}'.format(item_info)
display_text = '{0.identifier}: {0.caption}'.format(item_info)
else:
hidden_node = nodes.inline('', item_info.caption)
hidden_node['classes'].append('popup_caption')
Expand Down
4 changes: 2 additions & 2 deletions tests/directives/test_item_directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ def test_make_internal_item_ref_show_caption(self):

self.assertEqual(len(em_node.children), 1)
self.assertEqual(len(em_node.children), 1)
self.assertEqual(str(em_node), '<emphasis>some_id : caption text</emphasis>')
self.assertEqual(str(em_node), '<emphasis>some_id: caption text</emphasis>')
self.assertEqual(ref_node.tagname, 'reference')
self.assertEqual(em_node.rawsource, 'some_id : caption text')
self.assertEqual(em_node.rawsource, 'some_id: caption text')
cache = self.app.builder.env.traceability_ref_nodes[self.node['id']]
self.assertEqual(p_node, cache['default'][f'{self.node["document"]}.html'])

Expand Down

0 comments on commit e513981

Please sign in to comment.