Skip to content

Commit

Permalink
Merge pull request #248 from taigaio/refactor/2229-standardize-title-…
Browse files Browse the repository at this point in the history
…fields

Fix wiki reference link title attribute
  • Loading branch information
bameda committed Feb 10, 2015
2 parents 47a0b46 + d98e9a2 commit e14be84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion taiga/mdrender/extensions/references.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def handleMatch(self, m):
a = etree.Element('a')
a.text = link_text
a.set('href', url)
a.set('title', subject)
a.set('title', "#{} {}".format(obj_ref, subject))
a.set('class', html_classes)

self.md.extracted_data['references'].append(instance.content_object)
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/test_mdrender.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_proccessor_valid_us_reference():
instance.content_type.model = "userstory"
instance.content_object.subject = "test"
result = render(dummy_project, "**#1**")
expected_result = '<p><strong><a class="reference user-story" href="http://localhost:9001/project/test/us/1" title="test">#1</a></strong></p>'
expected_result = '<p><strong><a class="reference user-story" href="http://localhost:9001/project/test/us/1" title="#1 test">#1</a></strong></p>'
assert result == expected_result


Expand All @@ -53,7 +53,7 @@ def test_proccessor_valid_issue_reference():
instance.content_type.model = "issue"
instance.content_object.subject = "test"
result = render(dummy_project, "**#2**")
expected_result = '<p><strong><a class="reference issue" href="http://localhost:9001/project/test/issue/2" title="test">#2</a></strong></p>'
expected_result = '<p><strong><a class="reference issue" href="http://localhost:9001/project/test/issue/2" title="#2 test">#2</a></strong></p>'
assert result == expected_result


Expand All @@ -63,7 +63,7 @@ def test_proccessor_valid_task_reference():
instance.content_type.model = "task"
instance.content_object.subject = "test"
result = render(dummy_project, "**#3**")
expected_result = '<p><strong><a class="reference task" href="http://localhost:9001/project/test/task/3" title="test">#3</a></strong></p>'
expected_result = '<p><strong><a class="reference task" href="http://localhost:9001/project/test/task/3" title="#3 test">#3</a></strong></p>'
assert result == expected_result


Expand Down

0 comments on commit e14be84

Please sign in to comment.