Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove space before colons #388

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
JasperCraeghs marked this conversation as resolved.
Show resolved Hide resolved
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