question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changing Message#getContentStripped

See original GitHub issue

General Troubleshooting

  • I have checked for similar issues.
  • I have updated to the latest JDA version.
  • I have checked the branches or the maintainers’ PRs for upcoming features/bug fixes.

Issue

Issue Type

  • Bug Report
  • Feature Request

Description

At the moment does Message#getContentStripped(); remove symbols like * if they format the text (For example *text* becomes text). But sadly is that also the case when the symbol is escaped, what also makes it look weird (\*text* becomes \text) Would it be possible, to change that in a way, that it won’t remove the symbols, if they are escaped.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
MinnDevelopmentcommented, Feb 12, 2019

Turns out markdown is even more complicated than I imagined. A simple state-machine won’t work because something like “`abc **x**” requires a backtracking algorithm.

1reaction
MinnDevelopmentcommented, Feb 12, 2019

I’m currently working on something that could be used here: MarkdownSanitizer. This is still a WIP class but its probably a better approach to have a dedicated state-machine for sanitizing markdown formats.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found