drupal-meeting-parser
drupal-meeting-parser copied to clipboard
Parse linked text
IDK if this is even doable, but I figure I'll throw it out there for consideration!
Could "linked text" in Slack messages be parsed as <a href="https://www.example.com">Link text</a>
-- or even as Link text [https://www.example.com]
?
Possible complication: How would the parser tell the difference between linked "raw URLs" and linked text...? (no need for special treatment on "raw URLs," and, if the parser changed d.o issue links to <a>
tags, they wouldn't get the nice automatic "status" treatment on d.o)
Example
When I try using the parser on a Slack message with this content:
:two: :two: DDI Camp 2022, continued: Registration is open now! Don't miss your chance to attend - register today! :mega: Our Call for Speakers closes NEXT WEEK on August 17! Sessions are coming in, but we need you! Invite your friends, your colleagues, your communities! See thread for info about the Speaker Workshop happening later TODAY :point_right:
The linked text was just text, the links were gone.
Whereas when I did this thread:
:two: :three: DDI Camp: Volunteer and Support! :raising_hand: Thinking about volunteering to help put on DDI Camp this year? Join the #ddi-camp channel and roll up your sleeves! :bird: Amplify DDI Camp on Twitter! https://twitter.com/drupaldiversity/status/1557402202964377600
The "raw" Twitter link was included in the copy/paste.
One more example
...with the copy/paste output this time (I don't have it for the other examples anymore).
Original message content:
Yes! If you’re looking for more speaking experience or have never spoken before, please submit a talk! Join the ranks of the fantastic speakers who spoke at least year’s event by submitting your talk for consideration today!
Parser output:
<h2>Yes! If you’re looking for more speaking experience or have never spoken before, please submit a talk! Join the ranks of the fantastic speakers who spoke at least year’s event by submitting your talk for consideration today!</h2>
<table>
</table>
Participants:
I agree this would be great, however it would require a revamp of how the text is taken. I think we can try a querySelectorAll('a') and start from there, not just take its text content?
Tried creating something in the attached PR, on quick manual testing it works, but needs more testing probably.