{"action":"created","issue":{"url":"https://api.github.com/repos/BenSibley/Period/issues/3","repository_url":"https://api.github.com/repos/BenSibley/Period","labels_url":"https://api.github.com/repos/BenSibley/Period/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/BenSibley/Period/issues/3/comments","events_url":"https://api.github.com/repos/BenSibley/Period/issues/3/events","html_url":"https://github.com/BenSibley/Period/issues/3","id":198624489,"number":3,"title":"Excerpts of posts with <!--more--> ends weird","user":{"login":"barisunver","id":1160221,"avatar_url":"https://avatars.githubusercontent.com/u/1160221?v=3","gravatar_id":"","url":"https://api.github.com/users/barisunver","html_url":"https://github.com/barisunver","followers_url":"https://api.github.com/users/barisunver/followers","following_url":"https://api.github.com/users/barisunver/following{/other_user}","gists_url":"https://api.github.com/users/barisunver/gists{/gist_id}","starred_url":"https://api.github.com/users/barisunver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barisunver/subscriptions","organizations_url":"https://api.github.com/users/barisunver/orgs","repos_url":"https://api.github.com/users/barisunver/repos","events_url":"https://api.github.com/users/barisunver/events{/privacy}","received_events_url":"https://api.github.com/users/barisunver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-04T03:45:42Z","updated_at":"2017-01-04T15:27:00Z","closed_at":null,"body":"It's better if I show it first:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1160221/21631139/a57dadf2-d240-11e6-8797-362dbffcc432.png)\r\n\r\nThe problem arises when you have a (!--more--) tag inside a post. Period first takes the whole text before the more tag, and shows it all. Then, it takes the last paragraph and crams the whole paragraph into a single line, because of this CSS rule (line 520):\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1160221/21631157/e04e9572-d240-11e6-8908-90d4059e9b87.png)"},"comment":{"url":"https://api.github.com/repos/BenSibley/Period/issues/comments/270397700","html_url":"https://github.com/BenSibley/Period/issues/3#issuecomment-270397700","issue_url":"https://api.github.com/repos/BenSibley/Period/issues/3","id":270397700,"user":{"login":"barisunver","id":1160221,"avatar_url":"https://avatars.githubusercontent.com/u/1160221?v=3","gravatar_id":"","url":"https://api.github.com/users/barisunver","html_url":"https://github.com/barisunver","followers_url":"https://api.github.com/users/barisunver/followers","following_url":"https://api.github.com/users/barisunver/following{/other_user}","gists_url":"https://api.github.com/users/barisunver/gists{/gist_id}","starred_url":"https://api.github.com/users/barisunver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barisunver/subscriptions","organizations_url":"https://api.github.com/users/barisunver/orgs","repos_url":"https://api.github.com/users/barisunver/repos","events_url":"https://api.github.com/users/barisunver/events{/privacy}","received_events_url":"https://api.github.com/users/barisunver/received_events","type":"User","site_admin":false},"created_at":"2017-01-04T15:27:00Z","updated_at":"2017-01-04T15:27:00Z","body":"Inspired by your `ct_period_excerpt()` function, I wrote a \"more tag checker\" and hooked it to the `post_class()` so it adds a post class if the post includes a more tag. Would this function help with the issue?\r\n\r\n```\r\nfunction if_has_more( $classes ) {\r\n\tglobal $post;\r\n\tif( strpos( $post->post_content, '<!--more-->' ) ) {\r\n\t\t$classes[] = 'has-more-tag';\r\n\t}\r\n\t\r\n\treturn $classes;\r\n\t\r\n}\r\n\r\nadd_filter( 'post_class', 'if_has_more' );\r\n```"}}
{"actor":{"display_login":"barisunver"}}