Expand description
Utility functions for babyrite.
Functions§
- defuse_
code_ fences - Rewrites
textso it cannot terminate a Discord code fence. - escape_
markdown - Escapes
textso Discord renders it literally, on a single line. - fence_
info - Returns
languagefor use as a code fence’s info string, or an empty info string whenlanguagecontains a backtick. - inline_
code - Formats
textas inline code, or as escaped plain text when it contains a backtick. - language_
for_ path - Returns the language identifier for syntax highlighting based on a file path.
- language_
from_ extension - Returns the language identifier for syntax highlighting based on file extension.
- language_
from_ 🔒filename