BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
14.83k stars 1.86k forks source link

Add reStructuredText codemirror option #4817

Closed techauthoruk closed 7 months ago

techauthoruk commented 7 months ago

Describe the feature you'd like

Adding reStructuredText as a supported codemirror language

Describe the benefits this would bring to existing BookStack users

The ability to accurately reproduce reST content

Can the goal of this request already be achieved via other means?

Not that I am aware of

Have you searched for an existing open/closed issue?

How long have you been using BookStack?

Over 5 years

Additional context

No response

ssddanbrown commented 7 months ago

Thanks for the request @techauthoruk, but it looks like there's no official reStructuredText option for CodeMirror 6, which is usually the scope I keep to for adding new languages.

techauthoruk commented 7 months ago

@ssddanbrown

Ah, I know it supported in codemirror 5:

image

So I guess they have dropped support in v6 (I didn't realise it had moved to a new iteration)...although their website does say: There is also a collection of CodeMirror 5 modes that can be used, and a list of community-maintained language packages.

Ah, well, if it is no longer supported, never mind!

techauthoruk commented 7 months ago

...which does now beg the question - according to the codemirror website, it seems these are the only languages supported:

image

If this is the case, this could cause problems for me, as I document VB/VBA/VB.NET as well as reST in my BookStack instance. Does that mean these languages will no longer be supported in BookStack?

ssddanbrown commented 7 months ago

Does that mean these languages will no longer be supported in BookStack?

@techauthoruk We updated to CM6 last year (in v23.05), so I'm not currently dropping support for any languages that are supported in current versions of BookStack. Many of the languages on the transition from 5 to 6 has required use of those CM5 legacy modes to retain support, but not all CM5 modes are available in that. I had to build some CM6 compatible modes myself during that transition to avoid dropping languages, and it was pretty painful (the syntax/logic/handling is alien, and hard to understand/write, for me).

reStructuredText is not available in the ported (CM5) legacy modes, nor a fully supported CM6 language.

techauthoruk commented 7 months ago

Fair enough!

ssddanbrown commented 7 months ago

I'll therefore close this off as out of scope.