summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceUtils.h
diff options
context:
space:
mode:
author Ryan Mitchell <rtmitchell@google.com> 2019-03-06 15:06:49 -0800
committer Ryan Mitchell <rtmitchell@google.com> 2019-03-06 15:06:49 -0800
commit1d358ff5bb59f56ab19aa31d6afcf82c46b7c7bc (patch)
tree5d06705d5d234da3899fc21c71a024e6f2592b5b /tools/aapt2/ResourceUtils.h
parentf163c2111a72694f676f632762521376a6e80919 (diff)
Fix aapt2 whitespace diffs from aapt(1)
CDATA blocks were being processed differently in aapt2 so this change fixes aapt2 to not treat cdata blocks differently and still trime whitespace. Also, aapt did not process escapes when compiling xml files. This change removes over-processing of xml text nodes. All test strings are what aapt(1) would output. Test: aapt2_tests Bug: 124470332 Change-Id: I90ee0c1e5e9208f8a5c60cee93e3ba02712c9b2c
Diffstat (limited to 'tools/aapt2/ResourceUtils.h')
-rw-r--r--tools/aapt2/ResourceUtils.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/aapt2/ResourceUtils.h b/tools/aapt2/ResourceUtils.h
index a8a312005e4e..f77766ee9061 100644
--- a/tools/aapt2/ResourceUtils.h
+++ b/tools/aapt2/ResourceUtils.h
@@ -276,10 +276,8 @@ class StringBuilder {
// single quotations can be used without escaping them.
explicit StringBuilder(bool preserve_spaces = false);
- // Appends a chunk of text. If preserve_spaces is true, whitespace removal is not performed, and
- // single quotations can be used without escaping them for this append. Otherwise, the
- // StringBuilder will behave as it was constructed.
- StringBuilder& AppendText(const std::string& text, bool preserve_spaces = false);
+ // Appends a chunk of text.
+ StringBuilder& AppendText(const std::string& text);
// Starts a Span (tag) with the given name. The name is expected to be of the form:
// "tag_name;attr1=value;attr2=value;"