Stream: Zulip
Topic: Custom code formatting
Elliot Silver (Dec 03 2020 at 20:24):
@Tim Abbott, What's involved in getting a new formatter for code blocks for FSH (#shorthand)?
(@Gino Canessa, @Chris Moesel)
Josh Mandel (Dec 03 2020 at 20:56):
https://zulip.readthedocs.io/en/latest/subsystems/dependencies.html?highlight=pygment
Josh Mandel (Dec 03 2020 at 20:56):
Getting a working formatter defined for Pygments is the first step I think
Josh Mandel (Dec 03 2020 at 20:57):
https://pygments.org/docs/formatterdevelopment/ is the reference
Chris Moesel (Dec 03 2020 at 21:17):
@Josh Mandel - I saw that too, but they say:
The list of languages supported by our Markdown syntax highlighting comes from the pygments package.
I feel like it's not clear that if I create my own formatter that it can be integrated into Zulip right away or if I need to get it officially into the Pygments package. I guess maybe trying to make it official wouldn't be such a bad thing... We'll look into it.
Josh Mandel (Dec 03 2020 at 21:22):
Yeah, I assume that getting it into Pygments packages is the "supported" approach, but @Tim Abbott may have shortcuts / escape hatches!
Tim Abbott (Dec 07 2020 at 02:35):
@Elliot Silver yeah, getting the feature into pygments is definitely the recommended path; we like to do our changes upstream wherever possible since it helps the whole community. (And I know of at least one other project that got formatters into pygments upstream for Zulip use, so I think the maintainers there are active)
Last updated: Apr 12 2022 at 19:14 UTC