rpm-software-management / spec-cleaner

spec-cleaner
BSD 3-Clause "New" or "Revised" License
28 stars 34 forks source link

Incorrect handling of descriptions with line of format "keyword: some more text" #184

Closed Tracerneo closed 7 years ago

Tracerneo commented 7 years ago

I have ran into a bug, where spec-cleaner will incorrectly modify description, if one of the lines begins with a known tag followed by a colon.

Example:

 %description
 This project contains reference implementations, test cases, and other
 documents under source code control for Java Specification Request 305:
 Annotations for Software Defect Detection. More information at the Google
-group: http://groups.google.com/group/jsr-305.
+
+Group:          http://groups.google.com/group/jsr-305.

Another example:

This is a description that
provides:
some information

gets turned into

This is a description that

License:   
some information
scarabeusiv commented 7 years ago

Fun thing, the non-capitals version is parsed by RPM and actually intepreted, even in %description, the requirement is to have there empty line...

I wonder how to detect for this sanely....

scarabeusiv commented 7 years ago

Probably best would be to give up on the case-sensitivity if we at least once leave the preamble section...