diff options
| -rw-r--r-- | pydis_site/apps/content/models/tag.py | 5 | ||||
| -rw-r--r-- | pydis_site/templates/content/tag.html | 4 | 
2 files changed, 8 insertions, 1 deletions
| diff --git a/pydis_site/apps/content/models/tag.py b/pydis_site/apps/content/models/tag.py index 3c729768..c504ce21 100644 --- a/pydis_site/apps/content/models/tag.py +++ b/pydis_site/apps/content/models/tag.py @@ -23,6 +23,11 @@ class Commit(models.Model):          """The URL to the commit on GitHub."""          return self.URL_BASE + self.sha +    def lines(self) -> collections.abc.Iterable[str]: +        """Return each line in the commit message.""" +        for line in self.message.split("\n"): +            yield line +      def format_users(self) -> collections.abc.Iterable[str]:          """Return a nice representation of the user(s)' name and email."""          for author in json.loads(self.author): diff --git a/pydis_site/templates/content/tag.html b/pydis_site/templates/content/tag.html index 513009da..655dd786 100644 --- a/pydis_site/templates/content/tag.html +++ b/pydis_site/templates/content/tag.html @@ -31,7 +31,9 @@                      <div class="dropdown-item">{{ user }}</div>                  {% endfor %}                  <div class="dropdown-divider"></div> -                <div class="dropdown-item">{{ tag.last_commit.message }}</div> +                {% for line in tag.last_commit.lines %} +                    <div class="dropdown-item">{{ line }}</div> +                {% endfor %}              </div>          </div>      </div> | 
