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

PatternSyntaxException while !manual #415

Closed
snuyanzin opened this issue Dec 1, 2020 · 0 comments · Fixed by #416
Closed

PatternSyntaxException while !manual #415

snuyanzin opened this issue Dec 1, 2020 · 0 comments · Fixed by #416

Comments

@snuyanzin
Copy link
Collaborator

Syntax highlighting for manual sometimes failes...
Since about 3.13.0 jline3 introduced syntax highlighted for less which is enabled by default.
In fact the default configuration of this highlighting is a bit strange and does not match sqlline/sql commands.
It also fails on some envs like below.

java.util.regex.PatternSyntaxException: Unclosed character class near index 77
'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'
                                                                             ^
	at java.util.regex.Pattern.error(Pattern.java:1969)
	at java.util.regex.Pattern.clazz(Pattern.java:2562)
	at java.util.regex.Pattern.sequence(Pattern.java:2077)
	at java.util.regex.Pattern.expr(Pattern.java:2010)
	at java.util.regex.Pattern.group0(Pattern.java:2919)
	at java.util.regex.Pattern.sequence(Pattern.java:2065)
	at java.util.regex.Pattern.expr(Pattern.java:2010)
	at java.util.regex.Pattern.compile(Pattern.java:1702)
	at java.util.regex.Pattern.<init>(Pattern.java:1352)
	at java.util.regex.Pattern.compile(Pattern.java:1028)
	at org.jline.builtins.Nano$NanorcParser.doPattern(Nano.java:1797)
	at org.jline.builtins.Nano$NanorcParser.addHighlightRule(Nano.java:1784)
	at org.jline.builtins.Nano$NanorcParser.parse(Nano.java:1697)
	at org.jline.builtins.Nano$SyntaxHighlighter.build(Nano.java:1435)
	at org.jline.builtins.Less.openSource(Less.java:1023)
	at org.jline.builtins.Less.run(Less.java:324)
	at org.jline.builtins.Commands.less(Commands.java:150)
	at org.jline.builtins.Commands.less(Commands.java:122)
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

Successfully merging a pull request may close this issue.

1 participant