diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2015-06-23 06:52:12 +0000 |
---|---|---|
committer | yingke <yingke@Edk2> | 2015-06-23 06:52:12 +0000 |
commit | 45265a86142fe8259d2b2ba279b1b7b0da814993 (patch) | |
tree | 25db0d7767797dc487e1ef78ae615f6430a81898 /BaseTools/Source/Python/AutoGen | |
parent | 09ae0f111332895581084907d14353fe546a5b3a (diff) | |
download | edk2-platforms-45265a86142fe8259d2b2ba279b1b7b0da814993.tar.xz |
BaseTools: Fix a bug that UNI file can't have comment after #include "file.uni"
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
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/UniClassObject.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py index aa54f4fbd6..f900eac1d9 100644 --- a/BaseTools/Source/Python/AutoGen/UniClassObject.py +++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py @@ -293,8 +293,8 @@ class UniFileClassObject(object): if ((Line.count(u'"', 0, CommentPos) - Line.count(u'\\"', 0, CommentPos)) & 1) == 1:
CommentPos = Line.find (Comment, CommentPos + 1)
else:
- return Line[:CommentPos]
- return Line
+ return Line[:CommentPos].strip()
+ return Line.strip()
#
|