wassem / cssjanus

Automatically exported from code.google.com/p/cssjanus
Apache License 2.0
0 stars 0 forks source link

Exception is raised with "background: none;" #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Exception is raised by revision 31.
It was not raised by revision 27.

To reproduce:

1. Run cssjanus.py with following input:

body {background: none; padding: 1em 0;}

2. Traceback is shown:

Traceback (most recent call last):
  File "cssjanus.py", line 820, in <module>
    main(sys.argv[1:])
  File "cssjanus.py", line 816, in main
    fixed_lines = ChangeLeftToRightToLeft(sys.stdin.readlines())
  File "cssjanus.py", line 743, in ChangeLeftToRightToLeft
    line = FixBackgroundPosition(line)
  File "cssjanus.py", line 508, in FixBackgroundPosition
    line = BG_HORIZONTAL_LENGTH_RE.sub(CalculateNewBackgroundLengthPosition, line)
  File "cssjanus.py", line 641, in CalculateNewBackgroundLengthPosition
    WarnForBackgroundPosition(m.group(4), m.group(0))
  File "cssjanus.py", line 620, in WarnForBackgroundPosition
    raise BackgroundPositionError(bad_length, whole_value)
__main__.BackgroundPositionError: Unmirrorable horizonal value '1em': 
background: none; padding: 1em 0

Expected behavior is to get output same as the input. 

Thank you.

Original issue reported on code.google.com by ikedas...@gmail.com on 15 Feb 2013 at 7:32