forked from mirrors/bookwyrm
Merge pull request #1844 from bookwyrm-social/review-html
Fixes review markup for mastodon serialization
This commit is contained in:
commit
55ae6d1f8d
2 changed files with 5 additions and 5 deletions
|
@ -2,15 +2,15 @@
|
||||||
{% if rating %}
|
{% if rating %}
|
||||||
|
|
||||||
{% blocktrans trimmed with book_title=book.title|safe book_path=book.local_path display_rating=rating|floatformat:"-1" review_title=name|safe count counter=rating %}
|
{% blocktrans trimmed with book_title=book.title|safe book_path=book.local_path display_rating=rating|floatformat:"-1" review_title=name|safe count counter=rating %}
|
||||||
Review of "<a href='{{ book_path }}'>{{ book_title }}</a>" ({{ display_rating }} star): {{ review_title }}
|
Review of "{{ book_title }}" ({{ display_rating }} star): {{ review_title }}
|
||||||
{% plural %}
|
{% plural %}
|
||||||
Review of "<a href='{{ book_path }}'>{{ book_title }}</a>" ({{ display_rating }} stars): {{ review_title }}
|
Review of "{{ book_title }}" ({{ display_rating }} stars): {{ review_title }}
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% blocktrans trimmed with book_title=book.title|safe book_path=book.local_path review_title=name|safe %}
|
{% blocktrans trimmed with book_title=book.title|safe book_path=book.local_path review_title=name|safe %}
|
||||||
Review of "<a href='{{ book_path }}'>{{ book_title }}</a>": {{ review_title }}
|
Review of "{{ book_title }}": {{ review_title }}
|
||||||
{% endblocktrans %}
|
{% endblocktrans %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -301,7 +301,7 @@ class Status(TestCase):
|
||||||
self.assertEqual(activity["type"], "Article")
|
self.assertEqual(activity["type"], "Article")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
activity["name"],
|
activity["name"],
|
||||||
f"Review of \"<a href='{self.book.local_path}'>{self.book.title}</a>\" (3 stars): Review's name",
|
f'Review of "{self.book.title}" (3 stars): Review\'s name',
|
||||||
)
|
)
|
||||||
self.assertEqual(activity["content"], "test content")
|
self.assertEqual(activity["content"], "test content")
|
||||||
self.assertEqual(activity["attachment"][0].type, "Document")
|
self.assertEqual(activity["attachment"][0].type, "Document")
|
||||||
|
@ -326,7 +326,7 @@ class Status(TestCase):
|
||||||
self.assertEqual(activity["type"], "Article")
|
self.assertEqual(activity["type"], "Article")
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
activity["name"],
|
activity["name"],
|
||||||
f"Review of \"<a href='{self.book.local_path}'>{self.book.title}</a>\": Review name",
|
f'Review of "{self.book.title}": Review name',
|
||||||
)
|
)
|
||||||
self.assertEqual(activity["content"], "test content")
|
self.assertEqual(activity["content"], "test content")
|
||||||
self.assertEqual(activity["attachment"][0].type, "Document")
|
self.assertEqual(activity["attachment"][0].type, "Document")
|
||||||
|
|
Loading…
Reference in a new issue