diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-02-08 14:59:33 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-02-08 14:59:33 +0000 |
commit | 48acd464afd5ddb0439effdbf478fbccba124f11 (patch) | |
tree | c9f0dd81b6c07fd8d588012509a16d493786983c /Rpmdrake/formatting.pm | |
parent | 0e14a09f20541fbd7f31ec258a1028778ba5dd8b (diff) | |
download | rpmdrake-48acd464afd5ddb0439effdbf478fbccba124f11.tar rpmdrake-48acd464afd5ddb0439effdbf478fbccba124f11.tar.gz rpmdrake-48acd464afd5ddb0439effdbf478fbccba124f11.tar.bz2 rpmdrake-48acd464afd5ddb0439effdbf478fbccba124f11.tar.xz rpmdrake-48acd464afd5ddb0439effdbf478fbccba124f11.zip |
(format_update_field) factorize formating of update fields (type & description)
Diffstat (limited to 'Rpmdrake/formatting.pm')
-rw-r--r-- | Rpmdrake/formatting.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Rpmdrake/formatting.pm b/Rpmdrake/formatting.pm index 51ac8935..90cd0604 100644 --- a/Rpmdrake/formatting.pm +++ b/Rpmdrake/formatting.pm @@ -33,7 +33,7 @@ use ugtk2 qw(escape_text_for_TextView_markup_format); use Exporter; our @ISA = qw(Exporter); -our @EXPORT = qw(format_field format_header format_name_n_summary format_size localtime2changelog my_fullname pkg2medium rpm_description split_fullname urpm_name); +our @EXPORT = qw(format_field format_header format_name_n_summary format_size format_update_field localtime2changelog my_fullname pkg2medium rpm_description split_fullname urpm_name); sub rpm_description { @@ -82,6 +82,11 @@ sub pkg2medium { #- encodings; but if a user has a so broken setup we can't do much anyway sub localtime2changelog { to_utf8(POSIX::strftime("%c", localtime($_[0]))) } +sub format_update_field { + my ($name) = @_; + eval { escape_text_for_TextView_markup_format($name) }; +} + sub format_name_n_summary { my ($name, $summary) = @_; join("\n", '<b>' . $name . '</b>', escape_text_for_TextView_markup_format($summary)); |