vsch / flexmark-java

CommonMark/Markdown Java parser with source level AST. CommonMark 0.28, emulation of: pegdown, kramdown, markdown.pl, MultiMarkdown. With HTML to MD, MD to PDF, MD to DOCX conversion modules.
BSD 2-Clause "Simplified" License
2.21k stars 260 forks source link

How to build a "Minecraft" extension? #559

Open xiaoACE6716 opened 1 year ago

xiaoACE6716 commented 1 year ago

Hello everyone! I trying to make a Kook-Minecraft bridge for minecraft Server ,and the last thing I want to try convert Kook's markdown text to minecraft formatting codes.(What is a Kook?Something like discord.) some example: italics = *italics* -> §oitalics§r bold = **bold** -> §lbold§r bold italics = ***bold italics*** -> §l§obold italics§r§r strikeout = ~~strikeout~~ -> §mstrikeout§r underline = (ins)underline(ins) -> §nunderline§r I would like to find a way to convert the above examples (and all other combinations of markdown text) to something like this. I've tried using regex,but it doesn't work well when it's complicated. try with regex code link I need some suggestions as where to start from? If anyone has any idea how to go about doing this in java, help would be appreciated.

ghost commented 1 year ago

Have you tried asking on https://stackoverflow.com/?