Skip to content

Commit

Permalink
Add support for PowerShell Syntax Highlighting (#5909)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanselabreu authored Apr 22, 2024
1 parent ce2d74d commit 73ddf84
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libdefs/prismjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ declare module 'prismjs/components/prism-sql' {
declare module.exports: {};
}

declare module 'prismjs/components/prism-powershell' {
declare module.exports: {};
}

declare module 'prismjs/components/prism-python' {
declare module.exports: {};
}
Expand Down
1 change: 1 addition & 0 deletions packages/lexical-code/src/CodeHighlightNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const CODE_LANGUAGE_FRIENDLY_NAME_MAP: Record<string, string> = {
markdown: 'Markdown',
objc: 'Objective-C',
plain: 'Plain Text',
powershell: 'PowerShell',
py: 'Python',
rust: 'Rust',
sql: 'SQL',
Expand Down
1 change: 1 addition & 0 deletions packages/lexical-code/src/CodeHighlighterPrism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'prismjs/components/prism-c';
import 'prismjs/components/prism-css';
import 'prismjs/components/prism-objectivec';
import 'prismjs/components/prism-sql';
import 'prismjs/components/prism-powershell';
import 'prismjs/components/prism-python';
import 'prismjs/components/prism-rust';
import 'prismjs/components/prism-swift';
Expand Down
2 changes: 2 additions & 0 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const wwwMappings = {
'prismjs/components/prism-markdown': 'prism-markdown',
'prismjs/components/prism-markup': 'prism-markup',
'prismjs/components/prism-objectivec': 'prism-objectivec',
'prismjs/components/prism-powershell': 'prism-powershell',
'prismjs/components/prism-python': 'prism-python',
'prismjs/components/prism-rust': 'prism-rust',
'prismjs/components/prism-sql': 'prism-sql',
Expand Down Expand Up @@ -122,6 +123,7 @@ const externals = [
'prismjs/components/prism-css',
'prismjs/components/prism-objectivec',
'prismjs/components/prism-sql',
'prismjs/components/prism-powershell',
'prismjs/components/prism-python',
'prismjs/components/prism-rust',
'prismjs/components/prism-swift',
Expand Down

0 comments on commit 73ddf84

Please sign in to comment.