{"action":"created","comment":{"url":"https://api.github.com/repos/koreader/crengine/pulls/comments/117629107","pull_request_review_id":39353047,"id":117629107,"diff_hunk":"@@ -3131,49 +3109,9 @@ bool LVXMLParser::Parse()\n                 if ( (flags & TXTFLG_CONVERT_8BIT_ENTITY_ENCODING) && m_conv_table ) {\n                     PreProcessXmlString( attrvalue, 0, m_conv_table );\n                 }\n-                if (attrname.compare(\"class\")==0 ) {\n-                    hasattr=true;\n-                    int cnt=0;\n-                    attrvalue.trimDoubleSpaces(false,false,false);\n-                    if (attrvalue.pos(\" \")!=-1 &&(tagname.compare(\"table\")==0\n-                                                  ||tagname.compare(\"tr\")==0||tagname.compare(\"img\")==0))\n-                    {\n-                        lString16 tmp=(attrvalue.substr(0,attrvalue.pos(\" \")));\n-                        attrvalue=tmp;\n-                    }\n-                    if (attrvalue.pos(\" \") == -1) {\n-                        m_callback->OnAttribute(attrns.c_str(), attrname.c_str(), attrvalue.c_str());\n-                        if (tagname.compare(\"img\") != 0) {\n-                            multi_tagnumbers.add(\"1\");\n-                        }\n-                    }\n-                    else {\n-                            for(;;){\n-                            if (attrvalue.pos(\" \") != -1) {\n-                                m_callback->OnAttribute(attrns.c_str(), attrname.c_str(), attrvalue.substr(0,attrvalue.pos(\" \")).c_str());\n-                                attrvalue=attrvalue.substr(attrvalue.pos(\" \")+1,attrvalue.length()-attrvalue.pos(\" \")-1);\n-                                m_callback->OnTagBody();\n-                                if (attrvalue.pos(\" \") != -1){\n-                                    if (tagname.compare(\"div\")!=0) m_callback->OnTagOpen(tagns.c_str(),L\"span\");\n-                                    else m_callback->OnTagOpen(tagns.c_str(),L\"div\");\n-                                }\n-                                cnt++;\n-                            }\n-                            else\n-                            {\n-                                cnt++;\n-                                lString8 tmp=lString8(\"\");\n-                                tmp.appendDecimal(cnt);\n-                                multi_tagnumbers.add(tmp);\n-                                if (tagname.compare(\"div\")!=0) m_callback->OnTagOpen(tagns.c_str(),L\"span\");\n-                                else m_callback->OnTagOpen(tagns.c_str(),L\"div\");\n-                                m_callback->OnAttribute(attrns.c_str(), attrname.c_str(), attrvalue.c_str());\n-                                break;\n-                            }\n-                            }\n-                    }\n-                    }//support elements which defined multi classes,like this <span class=\"bold color italic\">\n-                else m_callback->OnAttribute(attrns.c_str(), attrname.c_str(), attrvalue.c_str());\n+                attrvalue.trimDoubleSpaces(false,false,false);//remove leading and ending spaces","path":"crengine/src/lvxml.cpp","position":101,"original_position":101,"commit_id":"d9bd0f28a1766590e299214bda5fc15a7bf0525e","original_commit_id":"d9bd0f28a1766590e299214bda5fc15a7bf0525e","user":{"login":"Frenzie","id":202757,"avatar_url":"https://avatars1.githubusercontent.com/u/202757?v=3","gravatar_id":"","url":"https://api.github.com/users/Frenzie","html_url":"https://github.com/Frenzie","followers_url":"https://api.github.com/users/Frenzie/followers","following_url":"https://api.github.com/users/Frenzie/following{/other_user}","gists_url":"https://api.github.com/users/Frenzie/gists{/gist_id}","starred_url":"https://api.github.com/users/Frenzie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Frenzie/subscriptions","organizations_url":"https://api.github.com/users/Frenzie/orgs","repos_url":"https://api.github.com/users/Frenzie/repos","events_url":"https://api.github.com/users/Frenzie/events{/privacy}","received_events_url":"https://api.github.com/users/Frenzie/received_events","type":"User","site_admin":false},"body":"What an odd (deceptive) function name. Not your fault obviously, but if stripping spaces from the beginning and end of a string is all you want to do then you should probably just use `trim()`.\r\n\r\nPS The function in question should be called something like `replaceMultipleSpaces` (i.e., any number of spaces to a single space) or `removeSpaces` (remove all spaces) depending on what it does exactly. But that's neither here nor there. Acting on whitespace in the middle of a string is *not* trimming.","created_at":"2017-05-21T10:20:07Z","updated_at":"2017-05-21T10:20:07Z","html_url":"https://github.com/koreader/crengine/pull/72#discussion_r117629107","pull_request_url":"https://api.github.com/repos/koreader/crengine/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/koreader/crengine/pulls/comments/117629107"},"html":{"href":"https://github.com/koreader/crengine/pull/72#discussion_r117629107"},"pull_request":{"href":"https://api.github.com/repos/koreader/crengine/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/koreader/crengine/pulls/72","id":121624896,"html_url":"https://github.com/koreader/crengine/pull/72","diff_url":"https://github.com/koreader/crengine/pull/72.diff","patch_url":"https://github.com/koreader/crengine/pull/72.patch","issue_url":"https://api.github.com/repos/koreader/crengine/issues/72","number":72,"state":"open","locked":false,"title":"several fixes","user":{"login":"frankyifei","id":8104251,"avatar_url":"https://avatars3.githubusercontent.com/u/8104251?v=3","gravatar_id":"","url":"https://api.github.com/users/frankyifei","html_url":"https://github.com/frankyifei","followers_url":"https://api.github.com/users/frankyifei/followers","following_url":"https://api.github.com/users/frankyifei/following{/other_user}","gists_url":"https://api.github.com/users/frankyifei/gists{/gist_id}","starred_url":"https://api.github.com/users/frankyifei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankyifei/subscriptions","organizations_url":"https://api.github.com/users/frankyifei/orgs","repos_url":"https://api.github.com/users/frankyifei/repos","events_url":"https://api.github.com/users/frankyifei/events{/privacy}","received_events_url":"https://api.github.com/users/frankyifei/received_events","type":"User","site_admin":false},"body":"1. another way to support multi classes for one element\r\n2. fix css rules set with id names\r\nThis should fix #2840 and #2849","created_at":"2017-05-20T14:11:17Z","updated_at":"2017-05-21T10:20:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09c18bd01942d02772fef47193bd31246634323f","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/koreader/crengine/pulls/72/commits","review_comments_url":"https://api.github.com/repos/koreader/crengine/pulls/72/comments","review_comment_url":"https://api.github.com/repos/koreader/crengine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/koreader/crengine/issues/72/comments","statuses_url":"https://api.github.com/repos/koreader/crengine/statuses/d9bd0f28a1766590e299214bda5fc15a7bf0525e","head":{"label":"frankyifei:fix","ref":"fix","sha":"d9bd0f28a1766590e299214bda5fc15a7bf0525e","user":{"login":"frankyifei","id":8104251,"avatar_url":"https://avatars3.githubusercontent.com/u/8104251?v=3","gravatar_id":"","url":"https://api.github.com/users/frankyifei","html_url":"https://github.com/frankyifei","followers_url":"https://api.github.com/users/frankyifei/followers","following_url":"https://api.github.com/users/frankyifei/following{/other_user}","gists_url":"https://api.github.com/users/frankyifei/gists{/gist_id}","starred_url":"https://api.github.com/users/frankyifei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankyifei/subscriptions","organizations_url":"https://api.github.com/users/frankyifei/orgs","repos_url":"https://api.github.com/users/frankyifei/repos","events_url":"https://api.github.com/users/frankyifei/events{/privacy}","received_events_url":"https://api.github.com/users/frankyifei/received_events","type":"User","site_admin":false},"repo":{"id":37311002,"name":"crengine","full_name":"frankyifei/crengine","owner":{"login":"frankyifei","id":8104251,"avatar_url":"https://avatars3.githubusercontent.com/u/8104251?v=3","gravatar_id":"","url":"https://api.github.com/users/frankyifei","html_url":"https://github.com/frankyifei","followers_url":"https://api.github.com/users/frankyifei/followers","following_url":"https://api.github.com/users/frankyifei/following{/other_user}","gists_url":"https://api.github.com/users/frankyifei/gists{/gist_id}","starred_url":"https://api.github.com/users/frankyifei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frankyifei/subscriptions","organizations_url":"https://api.github.com/users/frankyifei/orgs","repos_url":"https://api.github.com/users/frankyifei/repos","events_url":"https://api.github.com/users/frankyifei/events{/privacy}","received_events_url":"https://api.github.com/users/frankyifei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/frankyifei/crengine","description":"Mirror of the official crengine (Cool Reader Engine) repository at sourceforge.net http://sourceforge.net/projects/crengine/","fork":true,"url":"https://api.github.com/repos/frankyifei/crengine","forks_url":"https://api.github.com/repos/frankyifei/crengine/forks","keys_url":"https://api.github.com/repos/frankyifei/crengine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/frankyifei/crengine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/frankyifei/crengine/teams","hooks_url":"https://api.github.com/repos/frankyifei/crengine/hooks","issue_events_url":"https://api.github.com/repos/frankyifei/crengine/issues/events{/number}","events_url":"https://api.github.com/repos/frankyifei/crengine/events","assignees_url":"https://api.github.com/repos/frankyifei/crengine/assignees{/user}","branches_url":"https://api.github.com/repos/frankyifei/crengine/branches{/branch}","tags_url":"https://api.github.com/repos/frankyifei/crengine/tags","blobs_url":"https://api.github.com/repos/frankyifei/crengine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/frankyifei/crengine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/frankyifei/crengine/git/refs{/sha}","trees_url":"https://api.github.com/repos/frankyifei/crengine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/frankyifei/crengine/statuses/{sha}","languages_url":"https://api.github.com/repos/frankyifei/crengine/languages","stargazers_url":"https://api.github.com/repos/frankyifei/crengine/stargazers","contributors_url":"https://api.github.com/repos/frankyifei/crengine/contributors","subscribers_url":"https://api.github.com/repos/frankyifei/crengine/subscribers","subscription_url":"https://api.github.com/repos/frankyifei/crengine/subscription","commits_url":"https://api.github.com/repos/frankyifei/crengine/commits{/sha}","git_commits_url":"https://api.github.com/repos/frankyifei/crengine/git/commits{/sha}","comments_url":"https://api.github.com/repos/frankyifei/crengine/comments{/number}","issue_comment_url":"https://api.github.com/repos/frankyifei/crengine/issues/comments{/number}","contents_url":"https://api.github.com/repos/frankyifei/crengine/contents/{+path}","compare_url":"https://api.github.com/repos/frankyifei/crengine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/frankyifei/crengine/merges","archive_url":"https://api.github.com/repos/frankyifei/crengine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/frankyifei/crengine/downloads","issues_url":"https://api.github.com/repos/frankyifei/crengine/issues{/number}","pulls_url":"https://api.github.com/repos/frankyifei/crengine/pulls{/number}","milestones_url":"https://api.github.com/repos/frankyifei/crengine/milestones{/number}","notifications_url":"https://api.github.com/repos/frankyifei/crengine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/frankyifei/crengine/labels{/name}","releases_url":"https://api.github.com/repos/frankyifei/crengine/releases{/id}","deployments_url":"https://api.github.com/repos/frankyifei/crengine/deployments","created_at":"2015-06-12T08:27:18Z","updated_at":"2016-02-29T04:27:22Z","pushed_at":"2017-05-21T02:28:46Z","git_url":"git://github.com/frankyifei/crengine.git","ssh_url":"git@github.com:frankyifei/crengine.git","clone_url":"https://github.com/frankyifei/crengine.git","svn_url":"https://github.com/frankyifei/crengine","homepage":null,"size":18002,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"koreader:master","ref":"master","sha":"7377040ffb9a3136b0845e033e4eb7b01059fc4a","user":{"login":"koreader","id":3957564,"avatar_url":"https://avatars3.githubusercontent.com/u/3957564?v=3","gravatar_id":"","url":"https://api.github.com/users/koreader","html_url":"https://github.com/koreader","followers_url":"https://api.github.com/users/koreader/followers","following_url":"https://api.github.com/users/koreader/following{/other_user}","gists_url":"https://api.github.com/users/koreader/gists{/gist_id}","starred_url":"https://api.github.com/users/koreader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koreader/subscriptions","organizations_url":"https://api.github.com/users/koreader/orgs","repos_url":"https://api.github.com/users/koreader/repos","events_url":"https://api.github.com/users/koreader/events{/privacy}","received_events_url":"https://api.github.com/users/koreader/received_events","type":"Organization","site_admin":false},"repo":{"id":16614401,"name":"crengine","full_name":"koreader/crengine","owner":{"login":"koreader","id":3957564,"avatar_url":"https://avatars3.githubusercontent.com/u/3957564?v=3","gravatar_id":"","url":"https://api.github.com/users/koreader","html_url":"https://github.com/koreader","followers_url":"https://api.github.com/users/koreader/followers","following_url":"https://api.github.com/users/koreader/following{/other_user}","gists_url":"https://api.github.com/users/koreader/gists{/gist_id}","starred_url":"https://api.github.com/users/koreader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koreader/subscriptions","organizations_url":"https://api.github.com/users/koreader/orgs","repos_url":"https://api.github.com/users/koreader/repos","events_url":"https://api.github.com/users/koreader/events{/privacy}","received_events_url":"https://api.github.com/users/koreader/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/koreader/crengine","description":"Mirror of the official crengine (Cool Reader Engine) repository at sourceforge.net http://sourceforge.net/projects/crengine/","fork":false,"url":"https://api.github.com/repos/koreader/crengine","forks_url":"https://api.github.com/repos/koreader/crengine/forks","keys_url":"https://api.github.com/repos/koreader/crengine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koreader/crengine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koreader/crengine/teams","hooks_url":"https://api.github.com/repos/koreader/crengine/hooks","issue_events_url":"https://api.github.com/repos/koreader/crengine/issues/events{/number}","events_url":"https://api.github.com/repos/koreader/crengine/events","assignees_url":"https://api.github.com/repos/koreader/crengine/assignees{/user}","branches_url":"https://api.github.com/repos/koreader/crengine/branches{/branch}","tags_url":"https://api.github.com/repos/koreader/crengine/tags","blobs_url":"https://api.github.com/repos/koreader/crengine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koreader/crengine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koreader/crengine/git/refs{/sha}","trees_url":"https://api.github.com/repos/koreader/crengine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koreader/crengine/statuses/{sha}","languages_url":"https://api.github.com/repos/koreader/crengine/languages","stargazers_url":"https://api.github.com/repos/koreader/crengine/stargazers","contributors_url":"https://api.github.com/repos/koreader/crengine/contributors","subscribers_url":"https://api.github.com/repos/koreader/crengine/subscribers","subscription_url":"https://api.github.com/repos/koreader/crengine/subscription","commits_url":"https://api.github.com/repos/koreader/crengine/commits{/sha}","git_commits_url":"https://api.github.com/repos/koreader/crengine/git/commits{/sha}","comments_url":"https://api.github.com/repos/koreader/crengine/comments{/number}","issue_comment_url":"https://api.github.com/repos/koreader/crengine/issues/comments{/number}","contents_url":"https://api.github.com/repos/koreader/crengine/contents/{+path}","compare_url":"https://api.github.com/repos/koreader/crengine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koreader/crengine/merges","archive_url":"https://api.github.com/repos/koreader/crengine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koreader/crengine/downloads","issues_url":"https://api.github.com/repos/koreader/crengine/issues{/number}","pulls_url":"https://api.github.com/repos/koreader/crengine/pulls{/number}","milestones_url":"https://api.github.com/repos/koreader/crengine/milestones{/number}","notifications_url":"https://api.github.com/repos/koreader/crengine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koreader/crengine/labels{/name}","releases_url":"https://api.github.com/repos/koreader/crengine/releases{/id}","deployments_url":"https://api.github.com/repos/koreader/crengine/deployments","created_at":"2014-02-07T12:47:11Z","updated_at":"2017-05-19T03:11:35Z","pushed_at":"2017-05-21T02:28:47Z","git_url":"git://github.com/koreader/crengine.git","ssh_url":"git@github.com:koreader/crengine.git","clone_url":"https://github.com/koreader/crengine.git","svn_url":"https://github.com/koreader/crengine","homepage":null,"size":18000,"stargazers_count":15,"watchers_count":15,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":5,"forks":15,"open_issues":5,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/koreader/crengine/pulls/72"},"html":{"href":"https://github.com/koreader/crengine/pull/72"},"issue":{"href":"https://api.github.com/repos/koreader/crengine/issues/72"},"comments":{"href":"https://api.github.com/repos/koreader/crengine/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/koreader/crengine/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/koreader/crengine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/koreader/crengine/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/koreader/crengine/statuses/d9bd0f28a1766590e299214bda5fc15a7bf0525e"}}}}
{"actor":{"display_login":"Frenzie"}}