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

(ruby) Bitwise OR pipe confused with Block Parenthesis pipes #4187

Open
dysonreturns opened this issue Dec 18, 2024 · 0 comments · May be fixed by #4188
Open

(ruby) Bitwise OR pipe confused with Block Parenthesis pipes #4187

dysonreturns opened this issue Dec 18, 2024 · 0 comments · May be fixed by #4188
Labels
bug help welcome Could use help from community language

Comments

@dysonreturns
Copy link

Describe the issue
Bitwise OR operators which use pipe "|", i.e 1 | 2 get confused with block parenthesis syntax wich are two pipes, i.e.

[1,2,3].each do |num|
   # ...
end

Currently, anything after a pipe is forever highlighted as a parameter until another pipe appears.

Which language seems to have the issue?
ruby

Are you using highlight or highlightAuto?
Either one.

...

Sample Code to Reproduce

1 | 2 # Bitwise OR
puts "between '2' and '5.times' are all hljs-params"
5.times do |num|
 puts num
end

https://jsfiddle.net/oh57e1s2/

Expected behavior
Bitwise OR operator "|" should work just like any other &^~+-*/ etc.

@dysonreturns dysonreturns added bug help welcome Could use help from community language labels Dec 18, 2024
@dysonreturns dysonreturns linked a pull request Dec 18, 2024 that will close this issue
2 tasks
@dysonreturns dysonreturns changed the title (ruby) Bitewise OR pipe confused with Block Parenthesis pipes (ruby) Bitwise OR pipe confused with Block Parenthesis pipes Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help welcome Could use help from community language
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant