Skip to content

Commit

Permalink
fix(angelscript) Fix highlighting of int8, int16, int32, int64 (highl…
Browse files Browse the repository at this point in the history
…ightjs#3464)

* Swap order of int/uint and their explicit type variations to fix incomplete highlighting
  • Loading branch information
codecat authored and wkania committed Jan 29, 2022
1 parent e66dc42 commit 66c6c6d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ Grammars:
- enh(php) add support for PHP Attributes [Wojciech Kania][]
- enh(php) add named arguments [Wojciech Kania][]
- fix(php) PHP constants [Wojciech Kania][]
- fix(angelscript) incomplete int8, int16, int32, int64 highlighting [Melissa Geels][]

[Wojciech Kania]: https://github.com/wkania
[Melissa Geels]: https://github.com/codecat

## Version 11.4.0

Expand Down
2 changes: 1 addition & 1 deletion src/languages/angelscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Website: https://www.angelcode.com/angelscript/
export default function(hljs) {
const builtInTypeMode = {
className: 'built_in',
begin: '\\b(void|bool|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|string|ref|array|double|float|auto|dictionary)'
begin: '\\b(void|bool|int8|int16|int32|int64|int|uint8|uint16|uint32|uint64|uint|string|ref|array|double|float|auto|dictionary)'
};

const objectHandleMode = {
Expand Down
2 changes: 1 addition & 1 deletion test/detect/angelscript/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace MyApplication
array<SomeClass@> m_children;
array<array<SomeClass@>> m_subChildren; // Nested templates

int m_thing;
uint64 m_thing;

SomeClass()
{
Expand Down
1 change: 1 addition & 0 deletions test/markup/angelscript/default.expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<span class="hljs-built_in">array<span class="hljs-keyword">&lt;<span class="hljs-built_in">array<span class="hljs-keyword">&lt;<span class="hljs-symbol">SomeClass@</span>&gt;</span></span>&gt;</span></span> m_subChildren; <span class="hljs-comment">// Nested templates</span>

<span class="hljs-built_in">int</span> m_thing;
<span class="hljs-built_in">uint64</span> m_thing2;

SomeClass()
{
Expand Down
1 change: 1 addition & 0 deletions test/markup/angelscript/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace MyApplication
array<array<SomeClass@>> m_subChildren; // Nested templates

int m_thing;
uint64 m_thing2;

SomeClass()
{
Expand Down

0 comments on commit 66c6c6d

Please sign in to comment.