{"action":"created","issue":{"url":"https://api.github.com/repos/lukasgeiter/gettext-extractor/issues/19","repository_url":"https://api.github.com/repos/lukasgeiter/gettext-extractor","labels_url":"https://api.github.com/repos/lukasgeiter/gettext-extractor/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/lukasgeiter/gettext-extractor/issues/19/comments","events_url":"https://api.github.com/repos/lukasgeiter/gettext-extractor/issues/19/events","html_url":"https://github.com/lukasgeiter/gettext-extractor/issues/19","id":371705245,"node_id":"MDU6SXNzdWUzNzE3MDUyNDU=","number":19,"title":"trimWhiteSpace only trims newlines at the start of content","user":{"login":"markatrosie","id":37596985,"node_id":"MDQ6VXNlcjM3NTk2OTg1","avatar_url":"https://avatars1.githubusercontent.com/u/37596985?v=4","gravatar_id":"","url":"https://api.github.com/users/markatrosie","html_url":"https://github.com/markatrosie","followers_url":"https://api.github.com/users/markatrosie/followers","following_url":"https://api.github.com/users/markatrosie/following{/other_user}","gists_url":"https://api.github.com/users/markatrosie/gists{/gist_id}","starred_url":"https://api.github.com/users/markatrosie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markatrosie/subscriptions","organizations_url":"https://api.github.com/users/markatrosie/orgs","repos_url":"https://api.github.com/users/markatrosie/repos","events_url":"https://api.github.com/users/markatrosie/events{/privacy}","received_events_url":"https://api.github.com/users/markatrosie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-18T20:44:34Z","updated_at":"2019-01-04T23:56:44Z","closed_at":"2019-01-04T23:56:44Z","author_association":"NONE","body":"The documentation for the `trimWhiteSpace` option of HtmlExtractor indicates:\r\n\r\n> If set to true, white space at the very beginning and at the end of the content will get removed\r\n\r\nThe actual implementation, below, only trims *newline* characters from the start of string, but all whitespace characters from the end.\r\n\r\n>     if (options.trimWhiteSpace) {\r\n>        content = content.replace(/^\\n+|\\s+$/g, '');\r\n>     }\r\n\r\nI believe that should be `content.replace(/^\\s+|\\s+$/g, '')`."},"comment":{"url":"https://api.github.com/repos/lukasgeiter/gettext-extractor/issues/comments/451604164","html_url":"https://github.com/lukasgeiter/gettext-extractor/issues/19#issuecomment-451604164","issue_url":"https://api.github.com/repos/lukasgeiter/gettext-extractor/issues/19","id":451604164,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MTYwNDE2NA==","user":{"login":"lukasgeiter","id":5907946,"node_id":"MDQ6VXNlcjU5MDc5NDY=","avatar_url":"https://avatars3.githubusercontent.com/u/5907946?v=4","gravatar_id":"","url":"https://api.github.com/users/lukasgeiter","html_url":"https://github.com/lukasgeiter","followers_url":"https://api.github.com/users/lukasgeiter/followers","following_url":"https://api.github.com/users/lukasgeiter/following{/other_user}","gists_url":"https://api.github.com/users/lukasgeiter/gists{/gist_id}","starred_url":"https://api.github.com/users/lukasgeiter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukasgeiter/subscriptions","organizations_url":"https://api.github.com/users/lukasgeiter/orgs","repos_url":"https://api.github.com/users/lukasgeiter/repos","events_url":"https://api.github.com/users/lukasgeiter/events{/privacy}","received_events_url":"https://api.github.com/users/lukasgeiter/received_events","type":"User","site_admin":false},"created_at":"2019-01-04T23:56:44Z","updated_at":"2019-01-04T23:56:44Z","author_association":"OWNER","body":"Sorry for my late response. I've now added a [comment to the documentation](https://github.com/lukasgeiter/gettext-extractor/wiki/API-Reference#content-options-1) that hopefully makes it clear enough that, in combination with `preserveIndentation`, it doesn't exactly behave like `.trim()`."}}
{"actor":{"display_login":"lukasgeiter"}}