RNS Logo

rns.recipes

Community Forum

Forum / Off-topic / Ps, in the nomadnet version of this site, micron tags are not escaped

Ps, in the nomadnet version of this site, micron tags are not escaped

Started by Anonymous ·

Anonymous

In the "Full git nodes over Reticulum - Help testing" thread after r8io reply the formatting of the page gets permanently messed up and gets right aligned after their post and every post there after becomes right aligned instead of left aligned

If it matters; this occurred exactly when there was 18 replies on the most recent nomadnet version at the time of posting

Anonymous
from RNS.Utilities.rngit.util import convert_markdown_to_micron
micron_formatted = convert_markdown_to_micron(markdown_formatted)

If you want to go wild and have full syntax highlighting for code blocks, ensure pygments is installed on the system and then do:

from RNS.Utilities.rngit.util import MarkdownToMicron
from RNS.Utilities.rngit.highlight import SyntaxHighlighter

converter = MarkdownToMicron(max_width=self.MAX_RENDER_WIDTH, syntax_highlighter=SyntaxHighlighter())
micron_formatted = converter.format_block(markdown_formatted)
Zenith 19c5d885e2d7a4a1...

Fixed, sorry about that

I've also added code highlighting and a few other tweaks.

Mark bc7291552be7a58f...

Awesome! It's looking very nice now :)

Post a Reply

Markdown

Supports Markdown: **bold**, *italic*, `code`, ```code blocks```, [links](url)

Log in to upload images

Proof of work verification for anonymous posting

Copied to clipboard