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

enh(scala) remove symbol syntax and fix quoted code syntax #3324

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -16,6 +16,7 @@ Grammars:
- enh(css/less/stylus/scss) add support for CSS Grid properties [monochromer][]
- enh(java) add support for Java Text Block (#3322) [Teletha][]
- enh(scala) add missing `do` and `then` keyword (#3323) [Nicolas Stucki][]
- enh(scala) remove symbol syntax and fix quoted code syntax (#3324) [Nicolas Stucki][]

[Austin Schick]: https://github.com/austin-schick
[Josh Goebel]: https://github.com/joshgoebel
Expand Down
6 changes: 0 additions & 6 deletions src/languages/scala.js
Expand Up @@ -59,11 +59,6 @@ export default function(hljs) {

};

const SYMBOL = {
className: 'symbol',
begin: '\'\\w[\\w\\d_]*(?!\')'
};

const TYPE = {
className: 'type',
begin: '\\b[A-Z][A-Za-z0-9_]*',
Expand Down Expand Up @@ -127,7 +122,6 @@ export default function(hljs) {
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
STRING,
SYMBOL,
TYPE,
METHOD,
CLASS,
Expand Down
1 change: 1 addition & 0 deletions test/markup/scala/quoted-code.expect.txt
@@ -0,0 +1 @@
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">f</span></span>(using <span class="hljs-type">Quotes</span>) = &#x27;{ <span class="hljs-keyword">val</span> x = <span class="hljs-number">1</span>; ${g(&#x27;x)} }
1 change: 1 addition & 0 deletions test/markup/scala/quoted-code.txt
@@ -0,0 +1 @@
def f(using Quotes) = '{ val x = 1; ${g('x)} }
5 changes: 5 additions & 0 deletions test/markup/scala/symbol.expect.txt
@@ -0,0 +1,5 @@
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">f</span></span>(s: <span class="hljs-type">Symbol</span>) = {
s <span class="hljs-keyword">match</span> {
<span class="hljs-keyword">case</span> &#x27;foo =&gt;
}
}
5 changes: 5 additions & 0 deletions test/markup/scala/symbol.txt
@@ -0,0 +1,5 @@
def f(s: Symbol) = {
s match {
case 'foo =>
}
}