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

graffiti links / markdown are broken past 50 characters (truncation) #293

Open
thenfour opened this issue Apr 5, 2024 · 0 comments
Open
Assignees

Comments

@thenfour
Copy link
Owner

thenfour commented Apr 5, 2024

see:

let content = g.content.substring(0, DF.ServerSettings.GraffitiContentTruncate);

links are truncated due to GraffitiContentTruncate, which chops off closing brackets and other markdown syntax. Links are typically much shorter than the syntax so the truncation is not really serving its purpose here.

There are multiple issues here:

  1. markdown graffiti truncation is simply a broken concept. though i don't think it's common enough to care about in this generic sense
  2. Markdown links (specifically [caption](very_long_url_here)) should be treated differently than normal text graffiti. Possibly some hook into markdown-it, or something really gritty like measure text in parenthesis and increase truncation limit to include that.

An even simpler and quicker fix is to disable truncation for certain conditions:

  • when it's placed by an admin or mod
  • when it's pinned (so when the creator identity somehow disappears, it retains its no-truncation behavior)
@thenfour thenfour self-assigned this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant