highlightjs / highlight.js

JavaScript syntax highlighter with language auto-detection and zero dependencies.
https://highlightjs.org/
BSD 3-Clause "New" or "Revised" License
23.6k stars 3.58k forks source link

fix(swift) correctly highlight generics and conformances in type definitions #3937

Closed bradleymackey closed 9 months ago

bradleymackey commented 9 months ago

Fixes highlighting of type definitions, especially when the given type is generic.

Changes

Checklist

github-actions[bot] commented 9 months ago

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

5 files changed

Total change -51 B

View Changes | file | base | pr | diff | | --- | --- | --- | --- | | es/core.min.js | 8.17 KB | 8.17 KB | -1 B | | es/highlight.min.js | 8.17 KB | 8.17 KB | -1 B | | es/languages/swift.min.js | 3.54 KB | 3.52 KB | -24 B | | highlight.min.js | 8.21 KB | 8.21 KB | -1 B | | languages/swift.min.js | 3.55 KB | 3.52 KB | -24 B |
joshgoebel commented 9 months ago

I know it's not exactly the same thing, but might title.class.inherited be better than type?

bradleymackey commented 9 months ago

@joshgoebel I agree, this better models the semantics here. Please see latest changes.

github-actions[bot] commented 9 months ago

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

2 files changed

Total change +20 B

View Changes | file | base | pr | diff | | --- | --- | --- | --- | | es/languages/swift.min.js | 3.54 KB | 3.55 KB | +10 B | | languages/swift.min.js | 3.55 KB | 3.56 KB | +10 B |
github-actions[bot] commented 9 months ago

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

2 files changed

Total change +20 B

View Changes | file | base | pr | diff | | --- | --- | --- | --- | | es/languages/swift.min.js | 3.54 KB | 3.55 KB | +10 B | | languages/swift.min.js | 3.55 KB | 3.56 KB | +10 B |
github-actions[bot] commented 9 months ago

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

5 files changed

Total change -14 B

View Changes | file | base | pr | diff | | --- | --- | --- | --- | | es/core.min.js | 8.18 KB | 8.17 KB | -1 B | | es/highlight.min.js | 8.18 KB | 8.17 KB | -1 B | | es/languages/swift.min.js | 3.54 KB | 3.54 KB | -5 B | | highlight.min.js | 8.21 KB | 8.21 KB | -1 B | | languages/swift.min.js | 3.55 KB | 3.54 KB | -6 B |
github-actions[bot] commented 9 months ago

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

4 files changed

Total change -11 B

View Changes | file | base | pr | diff | | --- | --- | --- | --- | | es/core.min.js | 8.17 KB | 8.18 KB | +1 B | | es/highlight.min.js | 8.17 KB | 8.18 KB | +1 B | | es/languages/swift.min.js | 3.54 KB | 3.54 KB | -6 B | | languages/swift.min.js | 3.55 KB | 3.54 KB | -7 B |
github-actions[bot] commented 9 months ago

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

5 files changed

Total change -11 B

View Changes | file | base | pr | diff | | --- | --- | --- | --- | | es/core.min.js | 8.17 KB | 8.18 KB | +1 B | | es/highlight.min.js | 8.17 KB | 8.18 KB | +1 B | | es/languages/swift.min.js | 3.54 KB | 3.54 KB | -7 B | | highlight.min.js | 8.21 KB | 8.21 KB | +1 B | | languages/swift.min.js | 3.55 KB | 3.54 KB | -7 B |
github-actions[bot] commented 9 months ago

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

5 files changed

Total change -21 B

View Changes | file | base | pr | diff | | --- | --- | --- | --- | | es/core.min.js | 8.17 KB | 8.17 KB | -2 B | | es/highlight.min.js | 8.17 KB | 8.17 KB | -2 B | | es/languages/swift.min.js | 3.54 KB | 3.54 KB | -7 B | | highlight.min.js | 8.21 KB | 8.2 KB | -3 B | | languages/swift.min.js | 3.55 KB | 3.54 KB | -7 B |