Package: csstidy
Version: 1.4-1
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

when given an empty input file, csstidy exits with error and claims that
the syntax is invalid. This is not the case, empty CSS files are valid
according to the grammar.

The following patch allows empty files to be generated. This might be
a bit odd, so I added a warning about that in the output.

Regards,
  Bastian


- -- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-ck1treasure3 (PREEMPT)
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages csstidy depends on:
ii  libc6                         2.6.1-5    GNU C Library: Shared libraries
ii  libgcc1                       1:4.2.1-5  GCC support library
ii  libstdc++6                    4.2.1-5    The GNU Standard C++ Library v3

csstidy recommends no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG9BAqeBwlBDLsbz4RAhiNAKC6KOF9oECEjaRftoRHTfkdEwYN4ACdFwmV
2k/A4M0ztgFApH1gySE2ofM=
=y9aU
-----END PGP SIGNATURE-----
--- csstidy/print_css.cpp.orig  2007-09-21 19:58:59.634525029 +0200
+++ csstidy/print_css.cpp       2007-09-21 20:09:42.658639791 +0200
@@ -78,8 +78,7 @@
 {
        if(css.empty() && charset == "" && namesp == "" && import.empty() && 
csstokens.empty())
        {
-               if(!settings["silent"]) cout << "Invalid CSS!" << endl;
-               return;
+               if(!settings["silent"]) cout << "Warning: empty CSS output!" << 
endl;
        }
 
        ofstream file_output;

Reply via email to