Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lua long string incorrect - Need to capture begin pattern. #1927

Closed
bakpakin opened this issue Dec 15, 2018 · 2 comments
Closed

Lua long string incorrect - Need to capture begin pattern. #1927

bakpakin opened this issue Dec 15, 2018 · 2 comments

Comments

@bakpakin
Copy link

bakpakin commented Dec 15, 2018

Lua long string and comments are incorrect. The language syntax seems to expect that the delimiters needed to be paired, which is not the case.

Example:

--[===[
This a comment
]==]
This is still a comment, but not recognized as such by highlight.js
]===]

local function more(...)
  return
end

I encountered this issue while trying to add syntax highlighting for my own language, and was looking at other examples. Is there anyway to reference captures in the begin pattern in the end pattern?

@egor-rogov
Copy link
Collaborator

Well, the requested feature was discussed in #1897 (comment) but it's not likely to be implemented.

Currently you can use endSameAsBegin attribute. An example can be found in pgsql language, and description is in docs/css-classes-reference.rst.

@bakpakin
Copy link
Author

Ok, thanks then. I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants