]> git.ipfire.org Git - pbs.git/commitdiff
packages: Remove trailing dots from summaries
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Feb 2025 11:36:08 +0000 (11:36 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Feb 2025 11:37:20 +0000 (11:37 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/builds/macros.html
src/templates/builds/show.html
src/web/base.py
src/web/filters.py

index 3bddfc22f7142376a5863e8897372a33bcf56e1f..813b14735883b36a52f8168c47574f898e389283 100644 (file)
                                                                        {# Show the summary in a second line #}
                                                                        <p class="has-text-grey">
                                                                                <small>
-                                                                                       {{ pkg.summary }}
+                                                                                       {{ pkg.summary | summary }}
                                                                                </small>
                                                                        </p>
                                                                </div>
index 069f30086bbc8eecc6c545f6dcbe58b94e2909bd..ac4112ad34018e4bdef44890a85cc210964fffc2 100644 (file)
@@ -50,7 +50,7 @@
                                                        </h6>
                                                {% else %}
                                                        <h6 class="subtitle is-6">
-                                                               {{ build.pkg.summary }}
+                                                               {{ build.pkg.summary | summary }}
                                                        </h6>
                                                {% endif %}
 
index c8c8f2de9d583a5618643cdb755c580a897c0735..4a96160c6b914b7a6b78f9ddc4b0c08cd5e8ead1 100644 (file)
@@ -316,6 +316,7 @@ class BaseHandler(tornado.web.RequestHandler):
                        "hostname"      : filters.hostname,
                        "markdown"      : filters._markdown,
                        "static_url"    : filters.static_url,
+                       "summary"       : filters.summary,
 
                        # Add some Python built-ins
                        "dir"           : dir,
index 044a98faf40d47ecfdf0cefa00dd0a983b386870..438f6e30f5b90cf0d3531c7251d0bc8d982ddbad 100644 (file)
@@ -182,3 +182,9 @@ def static_url(ctx, *args, **kwargs):
        handler = ctx.get("handler")
 
        return handler.static_url(*args, **kwargs)
+
+def summary(summary):
+       """
+               Removes any trailing full stops
+       """
+       return summary.removesuffix(".")