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

Add support for PowerShell Syntax Highlighting #5909

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading