Add reStructuredText codemirror option #4440

Closed
opened 2026-02-05 08:53:47 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @techauthoruk on GitHub (Jan 31, 2024).

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?

  • I have searched for existing issues and none cover my fundamental request

How long have you been using BookStack?

Over 5 years

Additional context

No response

Originally created by @techauthoruk on GitHub (Jan 31, 2024). ### 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? - [X] I have searched for existing issues and none cover my fundamental request ### How long have you been using BookStack? Over 5 years ### Additional context _No response_
OVERLORD added the 🌔 Out of scope🔨 Feature Request labels 2026-02-05 08:53:47 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 31, 2024):

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.

@ssddanbrown commented on GitHub (Jan 31, 2024): 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.
Author
Owner

@techauthoruk commented on GitHub (Jan 31, 2024):

@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 on GitHub (Jan 31, 2024): @ssddanbrown Ah, I know it supported in codemirror 5: ![image](https://github.com/BookStackApp/BookStack/assets/57015243/82a676d7-0ef9-40cc-adaa-ca6c09ca70a4) 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](https://github.com/codemirror/legacy-modes) that can be used, and a list of [community-maintained language packages](https://codemirror.net/docs/community#language). Ah, well, if it is no longer supported, never mind!
Author
Owner

@techauthoruk commented on GitHub (Jan 31, 2024):

...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?

@techauthoruk commented on GitHub (Jan 31, 2024): ...which does now beg the question - according to the codemirror website, it seems these are the only languages supported: ![image](https://github.com/BookStackApp/BookStack/assets/57015243/83b25d14-f3a3-4fd9-a79b-bb0f5c9a7c83) 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?
Author
Owner

@ssddanbrown commented on GitHub (Jan 31, 2024):

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.

@ssddanbrown commented on GitHub (Jan 31, 2024): > 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.
Author
Owner

@techauthoruk commented on GitHub (Feb 1, 2024):

Fair enough!

@techauthoruk commented on GitHub (Feb 1, 2024): Fair enough!
Author
Owner

@ssddanbrown commented on GitHub (Feb 1, 2024):

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

@ssddanbrown commented on GitHub (Feb 1, 2024): I'll therefore close this off as out of scope.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4440