-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Add client-side parsing of inline markdown #4725
base: master
Are you sure you want to change the base?
Conversation
I may also add support for quotes (i.e. messages that start with a > sign). They could be styled similarly to Discord or Slack's quoting. |
why are you rebasing master onto your topic branch? |
@brunnre8 The contributing guidelines mentioned to rebase on the master branch, so that's what I've been doing. Sorry if I've misunderstood in some way. |
When asked to, if that disclaimer isn't there we need to update the docs. But you didn't do that, you rewrote the commits frommerge_base..master onto your topic branch rather than reparenting your topic branch. Look at the graph to see what I mean, |
Crap, that's my bad, I'm sorry. I'm quite new to using git. Should I fix it
properly and force push, or cherry pick my commits onto a fresh branch?
…On Wed, 26 Apr, 2023, 09:24 Reto, ***@***.***> wrote:
When asked to, if that disclaimer isn't there we need to update the docs.
But you didn't do that, you rewrote the commits frommerge_base..master
onto your topic branch rather than reparenting your topic branch.
Look at the graph to see what I mean, git log --oneline --graph --all
—
Reply to this email directly, view it on GitHub
<#4725 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFMGPWD4TXJF5HWJ5RYGBZ3XDCL57ANCNFSM6AAAAAAXIUBUQQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
fix it up and force push, yes. |
Okay! I think it's fixed now, apologies again for the mixup. |
Code is kinda spaghetti atm but works for a first version
cb4cacb
to
f01a90f
Compare
Hi, sorry to ping a dead thread - Is there anything else that's needed from my end to move this PR closer to merging? |
Frankly, I'm not sure I like the functionality much. So I'm unsure if the added complexity would be worth it. What I can say though is that the code is slightly crazy... Why are you doing that "rehydrate" dance and such? Your parser is also broken... tests might have helped you. // strips ** when it's not valid markdown
> parseMd('**testytest', false)
"<span class='irc-italic'></span>testytest"
// manages for * though
> parseMd('*testytest', false)
'*testytest' |
This PR introduces a client-side feature to parse inline markdown in messages and render it. I've added a settings toggle for it (Render inline markdown in messages), and the feature is off by default to avoid breaking anyone's workflow.
It DOES NOT insert IRC control characters or otherwise modify the message being sent out, it is purely cosmetic.
Markdown is quite widely used and there's is some amount of support for adding it to The Lounge as far as I can tell from previous GitHub discussion here (#1830). People also seem to use things like asterisks and backticks a lot on various channels for emphasis and code. Additionally, unlike the IRC control characters to turn text italic, bold, etc, Markdown gracefully degrades to plain text for people on clients which don't support those features, which imo is more sensible than losing the meaning entirely on a client that doesn't support that kind of formatting.
The parsing code is definitely inefficient in my opinion but does not introduce any noticeable delay in using the app even in large buffers.
Here's a screenshot of the normal behaviour, with the setting turned off:
Here's a screenshot with parsing turned on: