{"action":"created","comment":{"url":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/comments/229500932","pull_request_review_id":170018365,"id":229500932,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTUwMDkzMg==","diff_hunk":"@@ -0,0 +1,110 @@\n+{-|\n+Module      :  Data.OrgMode.Parse.Attoparsec.Util.ParseLinesTill\n+Copyright   :  © 2017 Parnell Springmeyer\n+License     :  All Rights Reserved\n+Maintainer  :  Parnell Springmeyer <parnell@digitalmentat.com>\n+Stability   :  stable\n+\n+Attoparsec utilities \n+-}\n+\n+{-# LANGUAGE ScopedTypeVariables #-}\n+\n+module Data.OrgMode.Parse.Attoparsec.Util.ParseLinesTill (\n+  takeALine,\n+  ParseLinesTill (..),\n+  takeBlockBreak,\n+  skipEmptyLines,\n+  ) where\n+\n+import qualified Control.Monad\n+import           Control.Arrow         ((&&&))\n+import           Data.Semigroup\n+import qualified Data.Attoparsec.Text  as Attoparsec.Text\n+import           Data.Attoparsec.Text  (Parser, takeTill, isEndOfLine, many1, anyChar, endOfLine, char, isHorizontalSpace, atEnd, parseOnly)\n+import           Data.Text             (Text, snoc)\n+import qualified Data.Text             as Text\n+import           Data.Functor          (($>))\n+import           Data.Foldable         (Foldable(..))\n+\n+takeALine :: Parser Text\n+takeALine = do\n+  content <- takeTill isEndOfLine\n+  Attoparsec.Text.option content (snoc content <$> anyChar)\n+\n+-- | Match only if there are more content to be consumed.\n+--\n+-- Opposite of @Attoparsec.Text.endOfInput@\n+hasMoreInput :: Parser ()\n+hasMoreInput = do\n+  x <- atEnd\n+  Control.Monad.when x $ fail \"reach the end of input\"\n+\n+-- | Matches only if the incoming text line consists nothing or only spaces\n+--\n+-- A empty line always ends a SectionBlock\n+takeEmptyLine :: Parser Text\n+takeEmptyLine = Attoparsec.Text.takeWhile isHorizontalSpace <* endOfLine\n+\n+-- | Succeed if it is a headline\n+headline :: Parser ()\n+headline = hasHeadlinePrefix *> atLeastOneSpace where\n+  atLeastOneSpace :: Parser ()\n+  atLeastOneSpace = do\n+    z <- anyChar\n+    if isHorizontalSpace z\n+      then return ()\n+      else fail \"Requiring a space after * for headline\"\n+  hasHeadlinePrefix = many1 (char '*')\n+\n+-- | Is the current line a @SectionBlock@ break.  A Line is a break\n+takeBlockBreak ::  Parser ()\n+takeBlockBreak = breakByEmptyLine <> breakByHeadline where\n+  breakByEmptyLine = takeEmptyLine $> ()\n+  breakByHeadline = headline\n+\n+-- | Transform a text content as block to work with current parser state\n+feedParserText :: Parser s -> Text -> Parser s\n+feedParserText  p t =\n+  case parseOnly p t of","path":"src/Data/OrgMode/Parse/Attoparsec/Util/ParseLinesTill.hs","position":69,"original_position":69,"commit_id":"0bef4cacfed4101216bb52cbbfbb3be7805269da","original_commit_id":"498969d7057785b691f7417a96225d61cd3fd5d7","user":{"login":"zhujinxuan","id":746159,"node_id":"MDQ6VXNlcjc0NjE1OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/746159?v=4","gravatar_id":"","url":"https://api.github.com/users/zhujinxuan","html_url":"https://github.com/zhujinxuan","followers_url":"https://api.github.com/users/zhujinxuan/followers","following_url":"https://api.github.com/users/zhujinxuan/following{/other_user}","gists_url":"https://api.github.com/users/zhujinxuan/gists{/gist_id}","starred_url":"https://api.github.com/users/zhujinxuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhujinxuan/subscriptions","organizations_url":"https://api.github.com/users/zhujinxuan/orgs","repos_url":"https://api.github.com/users/zhujinxuan/repos","events_url":"https://api.github.com/users/zhujinxuan/events{/privacy}","received_events_url":"https://api.github.com/users/zhujinxuan/received_events","type":"User","site_admin":false},"body":"Oh... I find the function, it is bifold","created_at":"2018-10-30T21:55:46Z","updated_at":"2018-10-30T21:55:46Z","html_url":"https://github.com/ixmatus/orgmode-parse/pull/42#discussion_r229500932","pull_request_url":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/42","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/comments/229500932"},"html":{"href":"https://github.com/ixmatus/orgmode-parse/pull/42#discussion_r229500932"},"pull_request":{"href":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/42"}},"in_reply_to_id":228761931},"pull_request":{"url":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/42","id":211206984,"node_id":"MDExOlB1bGxSZXF1ZXN0MjExMjA2OTg0","html_url":"https://github.com/ixmatus/orgmode-parse/pull/42","diff_url":"https://github.com/ixmatus/orgmode-parse/pull/42.diff","patch_url":"https://github.com/ixmatus/orgmode-parse/pull/42.patch","issue_url":"https://api.github.com/repos/ixmatus/orgmode-parse/issues/42","number":42,"state":"open","locked":false,"title":"Nested Markup and Simple List","user":{"login":"zhujinxuan","id":746159,"node_id":"MDQ6VXNlcjc0NjE1OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/746159?v=4","gravatar_id":"","url":"https://api.github.com/users/zhujinxuan","html_url":"https://github.com/zhujinxuan","followers_url":"https://api.github.com/users/zhujinxuan/followers","following_url":"https://api.github.com/users/zhujinxuan/following{/other_user}","gists_url":"https://api.github.com/users/zhujinxuan/gists{/gist_id}","starred_url":"https://api.github.com/users/zhujinxuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhujinxuan/subscriptions","organizations_url":"https://api.github.com/users/zhujinxuan/orgs","repos_url":"https://api.github.com/users/zhujinxuan/repos","events_url":"https://api.github.com/users/zhujinxuan/events{/privacy}","received_events_url":"https://api.github.com/users/zhujinxuan/received_events","type":"User","site_admin":false},"body":"Some ideas to support nested markup.\r\n\r\n","created_at":"2018-08-27T19:29:54Z","updated_at":"2018-10-30T21:55:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cda099591b7ca102f7cea3f7609a5b6c27cb821","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/42/commits","review_comments_url":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/42/comments","review_comment_url":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ixmatus/orgmode-parse/issues/42/comments","statuses_url":"https://api.github.com/repos/ixmatus/orgmode-parse/statuses/0bef4cacfed4101216bb52cbbfbb3be7805269da","head":{"label":"zhujinxuan:markup","ref":"markup","sha":"0bef4cacfed4101216bb52cbbfbb3be7805269da","user":{"login":"zhujinxuan","id":746159,"node_id":"MDQ6VXNlcjc0NjE1OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/746159?v=4","gravatar_id":"","url":"https://api.github.com/users/zhujinxuan","html_url":"https://github.com/zhujinxuan","followers_url":"https://api.github.com/users/zhujinxuan/followers","following_url":"https://api.github.com/users/zhujinxuan/following{/other_user}","gists_url":"https://api.github.com/users/zhujinxuan/gists{/gist_id}","starred_url":"https://api.github.com/users/zhujinxuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhujinxuan/subscriptions","organizations_url":"https://api.github.com/users/zhujinxuan/orgs","repos_url":"https://api.github.com/users/zhujinxuan/repos","events_url":"https://api.github.com/users/zhujinxuan/events{/privacy}","received_events_url":"https://api.github.com/users/zhujinxuan/received_events","type":"User","site_admin":false},"repo":{"id":141836000,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE4MzYwMDA=","name":"orgmode-parse","full_name":"zhujinxuan/orgmode-parse","private":false,"owner":{"login":"zhujinxuan","id":746159,"node_id":"MDQ6VXNlcjc0NjE1OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/746159?v=4","gravatar_id":"","url":"https://api.github.com/users/zhujinxuan","html_url":"https://github.com/zhujinxuan","followers_url":"https://api.github.com/users/zhujinxuan/followers","following_url":"https://api.github.com/users/zhujinxuan/following{/other_user}","gists_url":"https://api.github.com/users/zhujinxuan/gists{/gist_id}","starred_url":"https://api.github.com/users/zhujinxuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhujinxuan/subscriptions","organizations_url":"https://api.github.com/users/zhujinxuan/orgs","repos_url":"https://api.github.com/users/zhujinxuan/repos","events_url":"https://api.github.com/users/zhujinxuan/events{/privacy}","received_events_url":"https://api.github.com/users/zhujinxuan/received_events","type":"User","site_admin":false},"html_url":"https://github.com/zhujinxuan/orgmode-parse","description":"Attoparsec parser combinators for parsing org-mode structured text!","fork":true,"url":"https://api.github.com/repos/zhujinxuan/orgmode-parse","forks_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/forks","keys_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/teams","hooks_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/hooks","issue_events_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/issues/events{/number}","events_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/events","assignees_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/assignees{/user}","branches_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/branches{/branch}","tags_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/tags","blobs_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/statuses/{sha}","languages_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/languages","stargazers_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/stargazers","contributors_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/contributors","subscribers_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/subscribers","subscription_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/subscription","commits_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/contents/{+path}","compare_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/merges","archive_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/downloads","issues_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/issues{/number}","pulls_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/pulls{/number}","milestones_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/milestones{/number}","notifications_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/labels{/name}","releases_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/releases{/id}","deployments_url":"https://api.github.com/repos/zhujinxuan/orgmode-parse/deployments","created_at":"2018-07-21T18:15:08Z","updated_at":"2018-07-21T18:15:10Z","pushed_at":"2018-10-30T21:31:29Z","git_url":"git://github.com/zhujinxuan/orgmode-parse.git","ssh_url":"git@github.com:zhujinxuan/orgmode-parse.git","clone_url":"https://github.com/zhujinxuan/orgmode-parse.git","svn_url":"https://github.com/zhujinxuan/orgmode-parse","homepage":"","size":285,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ixmatus:master","ref":"master","sha":"1bdfbfe8fb7299724a6f6a122a93b2e96dd839f8","user":{"login":"ixmatus","id":30714,"node_id":"MDQ6VXNlcjMwNzE0","avatar_url":"https://avatars0.githubusercontent.com/u/30714?v=4","gravatar_id":"","url":"https://api.github.com/users/ixmatus","html_url":"https://github.com/ixmatus","followers_url":"https://api.github.com/users/ixmatus/followers","following_url":"https://api.github.com/users/ixmatus/following{/other_user}","gists_url":"https://api.github.com/users/ixmatus/gists{/gist_id}","starred_url":"https://api.github.com/users/ixmatus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ixmatus/subscriptions","organizations_url":"https://api.github.com/users/ixmatus/orgs","repos_url":"https://api.github.com/users/ixmatus/repos","events_url":"https://api.github.com/users/ixmatus/events{/privacy}","received_events_url":"https://api.github.com/users/ixmatus/received_events","type":"User","site_admin":false},"repo":{"id":20112132,"node_id":"MDEwOlJlcG9zaXRvcnkyMDExMjEzMg==","name":"orgmode-parse","full_name":"ixmatus/orgmode-parse","private":false,"owner":{"login":"ixmatus","id":30714,"node_id":"MDQ6VXNlcjMwNzE0","avatar_url":"https://avatars0.githubusercontent.com/u/30714?v=4","gravatar_id":"","url":"https://api.github.com/users/ixmatus","html_url":"https://github.com/ixmatus","followers_url":"https://api.github.com/users/ixmatus/followers","following_url":"https://api.github.com/users/ixmatus/following{/other_user}","gists_url":"https://api.github.com/users/ixmatus/gists{/gist_id}","starred_url":"https://api.github.com/users/ixmatus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ixmatus/subscriptions","organizations_url":"https://api.github.com/users/ixmatus/orgs","repos_url":"https://api.github.com/users/ixmatus/repos","events_url":"https://api.github.com/users/ixmatus/events{/privacy}","received_events_url":"https://api.github.com/users/ixmatus/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ixmatus/orgmode-parse","description":"Attoparsec parser combinators for parsing org-mode structured text!","fork":false,"url":"https://api.github.com/repos/ixmatus/orgmode-parse","forks_url":"https://api.github.com/repos/ixmatus/orgmode-parse/forks","keys_url":"https://api.github.com/repos/ixmatus/orgmode-parse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ixmatus/orgmode-parse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ixmatus/orgmode-parse/teams","hooks_url":"https://api.github.com/repos/ixmatus/orgmode-parse/hooks","issue_events_url":"https://api.github.com/repos/ixmatus/orgmode-parse/issues/events{/number}","events_url":"https://api.github.com/repos/ixmatus/orgmode-parse/events","assignees_url":"https://api.github.com/repos/ixmatus/orgmode-parse/assignees{/user}","branches_url":"https://api.github.com/repos/ixmatus/orgmode-parse/branches{/branch}","tags_url":"https://api.github.com/repos/ixmatus/orgmode-parse/tags","blobs_url":"https://api.github.com/repos/ixmatus/orgmode-parse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ixmatus/orgmode-parse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ixmatus/orgmode-parse/git/refs{/sha}","trees_url":"https://api.github.com/repos/ixmatus/orgmode-parse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ixmatus/orgmode-parse/statuses/{sha}","languages_url":"https://api.github.com/repos/ixmatus/orgmode-parse/languages","stargazers_url":"https://api.github.com/repos/ixmatus/orgmode-parse/stargazers","contributors_url":"https://api.github.com/repos/ixmatus/orgmode-parse/contributors","subscribers_url":"https://api.github.com/repos/ixmatus/orgmode-parse/subscribers","subscription_url":"https://api.github.com/repos/ixmatus/orgmode-parse/subscription","commits_url":"https://api.github.com/repos/ixmatus/orgmode-parse/commits{/sha}","git_commits_url":"https://api.github.com/repos/ixmatus/orgmode-parse/git/commits{/sha}","comments_url":"https://api.github.com/repos/ixmatus/orgmode-parse/comments{/number}","issue_comment_url":"https://api.github.com/repos/ixmatus/orgmode-parse/issues/comments{/number}","contents_url":"https://api.github.com/repos/ixmatus/orgmode-parse/contents/{+path}","compare_url":"https://api.github.com/repos/ixmatus/orgmode-parse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ixmatus/orgmode-parse/merges","archive_url":"https://api.github.com/repos/ixmatus/orgmode-parse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ixmatus/orgmode-parse/downloads","issues_url":"https://api.github.com/repos/ixmatus/orgmode-parse/issues{/number}","pulls_url":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls{/number}","milestones_url":"https://api.github.com/repos/ixmatus/orgmode-parse/milestones{/number}","notifications_url":"https://api.github.com/repos/ixmatus/orgmode-parse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ixmatus/orgmode-parse/labels{/name}","releases_url":"https://api.github.com/repos/ixmatus/orgmode-parse/releases{/id}","deployments_url":"https://api.github.com/repos/ixmatus/orgmode-parse/deployments","created_at":"2014-05-23T19:49:50Z","updated_at":"2018-10-14T12:14:33Z","pushed_at":"2018-10-30T21:31:30Z","git_url":"git://github.com/ixmatus/orgmode-parse.git","ssh_url":"git@github.com:ixmatus/orgmode-parse.git","clone_url":"https://github.com/ixmatus/orgmode-parse.git","svn_url":"https://github.com/ixmatus/orgmode-parse","homepage":"","size":188,"stargazers_count":65,"watchers_count":65,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":13,"open_issues":7,"watchers":65,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/42"},"html":{"href":"https://github.com/ixmatus/orgmode-parse/pull/42"},"issue":{"href":"https://api.github.com/repos/ixmatus/orgmode-parse/issues/42"},"comments":{"href":"https://api.github.com/repos/ixmatus/orgmode-parse/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ixmatus/orgmode-parse/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/ixmatus/orgmode-parse/statuses/0bef4cacfed4101216bb52cbbfbb3be7805269da"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"zhujinxuan"}}