Skip to content

Add support for Lua comment style for MagicComments #8859

@jcarrillo7

Description

@jcarrillo7

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

The current magic comment syntax for highlighting is great but it doesn't have support for Lua's comment style.
Lua uses -- for short single line comments. Right now I resort to using to using the C/Python comment styles as a workaround but this makes copy/pasting/testing the code snippets a pain since I need to keep removing these invalid lines.

Reproducible demo

No response

Steps to reproduce

  • Use lua language in CodeBlock
  • use magic comments to highlight regions of code

Expected behavior

Expected -- highlight-start and -- highlight-end to work in lua but it does not.

Actual behavior

Does not work

Your environment

No response

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis is not a bug or issue with Docusausus, per se. It is a feature request for the future.good first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions