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

Support per-channel configurable Markdown conversion #49

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

burdoto
Copy link
Contributor

@burdoto burdoto commented Mar 22, 2024

This PR adds support for Markdown conversion.

@Yann151924
Copy link
Member

The purpose of this pr is to add markdown support directly in minecraft channel ? Or to support markdown text from other source like discord ?

Just to be sure i understand :)

@burdoto
Copy link
Contributor Author

burdoto commented Mar 24, 2024

This is supposed to convert Markdown in ingame Chat messages to Tellraw data; other sources such as Discord for example would imparatively need to parse markdown themselves.
This is part of why I'd like to have a centralized API like #43 in order to move the parser function to the API to yield constant and consistent output per version.

@Yann151924
Copy link
Member

Can be good to look to add something like this for the parsing : https://github.com/Vankka/MCDiscordReserializer since it's process markdown from discord :)
It's preferable to add a library for processing/parsing message in order to don't complexify the code in Utils.java

@burdoto
Copy link
Contributor Author

burdoto commented Apr 28, 2024

i agree about the polyfill class.

however; for a couple of things used here (tellraw data, mc format codes and markdown conversion, and even already for rabbitmq connections), i have already collected a couple (and more) utility classes in my common api library
however i didn't add it to the build for a couple of reasons;

  • its a large library with a lot of boilerplate that is dormant until used, even introduces some databinding
  • its not on mavencentral but instead on my custom repository
  • some classes are not finished

i think like you suggested, it would be good having a library for this.
with a long-term refactor, i think that aurionchat can profit a lot from this library; but that would mean a bunch of work ahead.
if you want to go the easy way, it would be the most feasible way to just use this library you already linked.

@Yann151924
Copy link
Member

I prefer the "hard way" :D and maybe think about to refactor this part of the code to ease the maintenance of it and the readability .
Or maybe it would be better to add a way for a "plug-in system", so people can had there specific way to handle the parsing of the message itself.

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

Successfully merging this pull request may close these issues.

2 participants