]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix a bug that UNI file can't have comment after #include "file.uni"
authorYingke Liu <yingke.d.liu@intel.com>
Tue, 23 Jun 2015 06:52:12 +0000 (06:52 +0000)
committeryingke <yingke@Edk2>
Tue, 23 Jun 2015 06:52:12 +0000 (06:52 +0000)
The 'include' regular expression cannot match spaces before or after this statement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yingke Liu <yingke.d.liu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17680 6f19259b-4bc3-4df7-8a09-765794883524

BaseTools/Source/Python/AutoGen/UniClassObject.py

index aa54f4fbd611ae79d6551c8d47f3bca34c113941..f900eac1d94af4df83093f1d51bb5dde0e11a4c7 100644 (file)
@@ -293,8 +293,8 @@ class UniFileClassObject(object):
             if ((Line.count(u'"', 0, CommentPos) - Line.count(u'\\"', 0, CommentPos)) & 1) == 1:\r
                 CommentPos = Line.find (Comment, CommentPos + 1)\r
             else:\r
-                return Line[:CommentPos]\r
-        return Line\r
+                return Line[:CommentPos].strip()\r
+        return Line.strip()\r
                 \r
 \r
     #\r