Skip to content
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

Website: render usernames #175

Merged
merged 4 commits into from
May 17, 2022
Merged

Conversation

loicttn
Copy link
Contributor

@loicttn loicttn commented May 8, 2022

Simple pr to replace all @username per [@username](/r/users:username) dynamically on website

Copy link
Member

@moul moul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, maybe we should start having some kind of way to communicate from the contract to marked to togger various settings, maybe something like <!-- marked:no-username -->

@moul moul requested a review from jaekwon May 9, 2022 16:05
@moul moul added the gnoland label May 9, 2022
@moul
Copy link
Member

moul commented May 17, 2022

@jaekwon what do you think about this one?

I personally like it.

If if it too problematic, we can imagine writing an helper that replaces automatically the @username of a markdown blob. This way, a smart contract can decide to use it whe{n,r}ever it wants; i.e., on r/boards.Post.Body

@jaekwon
Copy link
Contributor

jaekwon commented May 17, 2022

I like doing this on the client side, but shouldn't it happen after markdown is all parsed?
Otherwise, there will be strange bugs, like what if the @username was part of a link text, like
this reference to @username. It will likely be difficult to get right w/ regexp.
But if we just do it after regexp is complete, then that's tricky too, given the way HTML works with text spans.

@jaekwon
Copy link
Contributor

jaekwon commented May 17, 2022

How about [[@username]]?

@moul
Copy link
Member

moul commented May 17, 2022

How about [[@username]]?

I think we should be human-friendly, and on GitHub and a lot of other platforms, this is just @username

@jaekwon
Copy link
Contributor

jaekwon commented May 17, 2022

ok. let's run with it and we can fix this later. i will make an issue.yy

@jaekwon jaekwon merged commit f56bf18 into gnolang:master May 17, 2022
@moul moul added this to the 🏗2️⃣ test2.gno.land milestone Oct 20, 2022
@moul moul mentioned this pull request Jul 2, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants