diff options
author | Lars Thorsén <[email protected]> | 2017-04-27 14:09:58 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2017-04-27 14:09:58 +0200 |
commit | 74149d797864cb2de1b4d2b58292d27a4f7895ae (patch) | |
tree | 6e5d63e39b810dc18ed4c191379f2a80a5469a63 /lib/xmerl/src/xmerl_scan.erl | |
parent | 50c902fbdeb0da8daa074b572dd17106e78e3ef9 (diff) | |
parent | 027c94a04a3c78daa351b025c68694f01c566560 (diff) | |
download | otp-74149d797864cb2de1b4d2b58292d27a4f7895ae.tar.gz otp-74149d797864cb2de1b4d2b58292d27a4f7895ae.tar.bz2 otp-74149d797864cb2de1b4d2b58292d27a4f7895ae.zip |
Merge pull request #1369 from JYZR/fix-xmerl_scan-acc
Improves accumulator fun in xmerl_scan so that only one #xmlText record is returned for strings which have character references.
OTP-14377
Improves accumulator fun in xmerl_scan
Diffstat (limited to 'lib/xmerl/src/xmerl_scan.erl')
-rw-r--r-- | lib/xmerl/src/xmerl_scan.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/xmerl/src/xmerl_scan.erl b/lib/xmerl/src/xmerl_scan.erl index 95dc82e5c9..18fe7031b9 100644 --- a/lib/xmerl/src/xmerl_scan.erl +++ b/lib/xmerl/src/xmerl_scan.erl @@ -474,8 +474,8 @@ event(_X, S) -> %% into multiple objects (in which case {Acc',Pos',S'} should be returned.) %% If {Acc',S'} is returned, Pos will be incremented by 1 by default. %% Below is an example of an acceptable operation -acc(X = #xmlText{value = Text}, Acc, S) -> - {[X#xmlText{value = Text}|Acc], S}; +acc(#xmlText{value = Text}, [X = #xmlText{value = AccText}], S) -> + {[X#xmlText{value = AccText ++ Text}], S}; acc(X, Acc, S) -> {[X|Acc], S}. |