Related to issue #58, this PR simplifies the code in the article template that handles looking for social media embeds: now it matches a URL on its own line and replaces it with the appropriate embed code.
This was previously more complicated because of how Google Docs seems to handle URLs surrounded by plain text: they come through as a parent node with multiple children nodes, with the text broken up among them. Matching a URL on its own, regardless of whether it is hyperlinked in the doc or not, is a lot more straightforward.
Related to issue #58, this PR simplifies the code in the article template that handles looking for social media embeds: now it matches a URL on its own line and replaces it with the appropriate embed code.
This was previously more complicated because of how Google Docs seems to handle URLs surrounded by plain text: they come through as a parent node with multiple children nodes, with the text broken up among them. Matching a URL on its own, regardless of whether it is hyperlinked in the doc or not, is a lot more straightforward.