{"action":"created","issue":{"url":"https://api.github.com/repos/funkhaus/vuepress/issues/81","repository_url":"https://api.github.com/repos/funkhaus/vuepress","labels_url":"https://api.github.com/repos/funkhaus/vuepress/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/funkhaus/vuepress/issues/81/comments","events_url":"https://api.github.com/repos/funkhaus/vuepress/issues/81/events","html_url":"https://github.com/funkhaus/vuepress/issues/81","id":303307941,"number":81,"title":"Self closing componets from shortcodes don't render following text","user":{"login":"drewbaker","id":475015,"avatar_url":"https://avatars1.githubusercontent.com/u/475015?v=4","gravatar_id":"","url":"https://api.github.com/users/drewbaker","html_url":"https://github.com/drewbaker","followers_url":"https://api.github.com/users/drewbaker/followers","following_url":"https://api.github.com/users/drewbaker/following{/other_user}","gists_url":"https://api.github.com/users/drewbaker/gists{/gist_id}","starred_url":"https://api.github.com/users/drewbaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewbaker/subscriptions","organizations_url":"https://api.github.com/users/drewbaker/orgs","repos_url":"https://api.github.com/users/drewbaker/repos","events_url":"https://api.github.com/users/drewbaker/events{/privacy}","received_events_url":"https://api.github.com/users/drewbaker/received_events","type":"User","site_admin":false},"labels":[{"id":583158436,"url":"https://api.github.com/repos/funkhaus/vuepress/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-08T00:10:35Z","updated_at":"2018-03-09T20:45:11Z","closed_at":"2018-03-09T20:45:11Z","author_association":"CONTRIBUTOR","body":"If I have a chunk of text like this in the WP content editor:\r\n\r\n```\r\n<h2>Say Hello</h2>\r\n\r\n[social-links]\r\n\r\nWe have five regional o ces throughout California in order to provide superior service o erings. Reach out to us today to get started on your project.\r\n```\r\nAnd this PHP with a self closing component:\r\n\r\n```\r\n\tfunction custom_shortcode_social_links( $atts, $content = '', $name ) {\r\n            // return '<social-links/>'; // This won't render any content below the shortcode\r\n            return '<social-links></social-links>'; // This will render content below shortcode.\r\n\t}\r\n\tadd_shortcode( 'social-links', 'custom_shortcode_social_links' );\r\n```\r\n\r\nThe shortcode will work, but not show any text below it."},"comment":{"url":"https://api.github.com/repos/funkhaus/vuepress/issues/comments/371940135","html_url":"https://github.com/funkhaus/vuepress/issues/81#issuecomment-371940135","issue_url":"https://api.github.com/repos/funkhaus/vuepress/issues/81","id":371940135,"user":{"login":"jrobson153","id":6475336,"avatar_url":"https://avatars0.githubusercontent.com/u/6475336?v=4","gravatar_id":"","url":"https://api.github.com/users/jrobson153","html_url":"https://github.com/jrobson153","followers_url":"https://api.github.com/users/jrobson153/followers","following_url":"https://api.github.com/users/jrobson153/following{/other_user}","gists_url":"https://api.github.com/users/jrobson153/gists{/gist_id}","starred_url":"https://api.github.com/users/jrobson153/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrobson153/subscriptions","organizations_url":"https://api.github.com/users/jrobson153/orgs","repos_url":"https://api.github.com/users/jrobson153/repos","events_url":"https://api.github.com/users/jrobson153/events{/privacy}","received_events_url":"https://api.github.com/users/jrobson153/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T20:45:11Z","updated_at":"2018-03-09T20:45:11Z","author_association":"OWNER","body":"@drewbaker I ran into this today, here's the answer: https://vuejs.org/v2/style-guide/#Self-closing-components-strongly-recommended\r\n\r\nThe big takeaway:\r\n> Components with no content should be self-closing in single-file components, string templates, and JSX - but never in DOM templates.\r\n\r\nIt's okay (and recommended) for us to do self-closing tags in single file components because they're pre-compiled but since `wp-content` compiles them on the fly, self-closing tags break things.\r\n\r\nBasically, the answer is just don't do this in shortcodes."}}
{"actor":{"display_login":"jrobson153"}}