From: Michael Tremer Date: Fri, 27 Oct 2017 10:48:29 +0000 (+0100) Subject: Drop pre flag of Text module X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf28d42eea34487a4dbab052bb07a0f8dc51f9aa;p=pbs.git Drop pre flag of Text module Signed-off-by: Michael Tremer --- diff --git a/src/templates/distro-source-commit-detail.html b/src/templates/distro-source-commit-detail.html index e411b6d9..9f26c81e 100644 --- a/src/templates/distro-source-commit-detail.html +++ b/src/templates/distro-source-commit-detail.html @@ -59,15 +59,11 @@ {{ _("Committer") }} {% raw format_email(commit.committer) %} - - {{ _("Subject") }} - {{ commit.subject }} - {% if commit.message %} - {% module Text(commit.message, pre=True) %} + {% module CommitMessage(commit) %} {% end %} diff --git a/src/templates/modules/log-entry-small.html b/src/templates/modules/log-entry-small.html index 4ae75f58..24632b15 100644 --- a/src/templates/modules/log-entry-small.html +++ b/src/templates/modules/log-entry-small.html @@ -6,6 +6,6 @@ {{ format_date(entry.time) }}

- {% module Text(entry.get_message(current_user), pre=False) %} + {% module Text(entry.get_message(current_user)) %} diff --git a/src/templates/modules/log-entry.html b/src/templates/modules/log-entry.html index 53edce8f..7b995493 100644 --- a/src/templates/modules/log-entry.html +++ b/src/templates/modules/log-entry.html @@ -33,7 +33,7 @@ {% end block %} {% block message %} - {% module Text(entry.get_message(current_user), pre=False) %} + {% module Text(entry.get_message(current_user)) %} {% end block %} {% end block %} diff --git a/src/templates/repository-detail.html b/src/templates/repository-detail.html index 4a4db0ae..1d8338e4 100644 --- a/src/templates/repository-detail.html +++ b/src/templates/repository-detail.html @@ -55,7 +55,7 @@
- {% module Text(repo.description, pre=False) %} + {% module Text(repo.description) %}


diff --git a/src/web/ui_modules.py b/src/web/ui_modules.py index 8fd65adb..fe22f972 100644 --- a/src/web/ui_modules.py +++ b/src/web/ui_modules.py @@ -33,7 +33,7 @@ class TextModule(UIModule): paragraph = "".join(line_iteration) yield paragraph.replace("\n", " ") - def render(self, text, pre=False): + def render(self, text): # Handle empty messages if not text: return "" @@ -44,9 +44,6 @@ class TextModule(UIModule): # Search for CVE numbers and create hyperlinks. text = re.sub(self.CVE_PATTERN, self._cve_repl, text, re.I|re.U) - if pre: - return "
%s
" % text - return text def _bugzilla_repl(self, m):