Modonomicon

Modonomicon

1M Downloads

Markdown for code blocks just doesn't render

thomasglasser opened this issue ยท 4 comments

commented

Describe the bug
When using ```json type code blocks in a wiki, the text doesn't render at all

Screenshots
image
image

System (please complete the following information):

  • Modonomicon Version: 1.100.2
  • OS: Windows
  • Minecraft Version: 1.21.1
commented

This also applies to single ticks like this

commented

This could be a tricky one.

To get started with, what would be the desired vanilla rendering representation of this?
Modonomicon translates markdown to components, but I am not sure if MC has the concept of monospace/code blocks.

I think in the past it had some sort of pretty-print for nbt which basically was json code highlighting, but did not preserve structure/spacing.

The reason why nothing shows - I think - is that common mark parses the code blocks, but currently the MC renderer does nothing with it. We can change that, but we need to figure out what the mc component structure should be

commented

Would it be possible to simulate it by loading the font and adding the background?

commented

If MC does not have anything approaching what we want then it may be better to have a custom page type that renders json, much like the image or recipe type.

That still offers some complications (such as the formatting both in terms of colors and structure), but at least then the background can be controlled ( I don't think minecraft component styles can style the font background)