Add command-line as an alternative to highlighted languages (#15)

This commit is contained in:
Steven Stallion 2025-03-28 08:01:00 -05:00 committed by GitHub
parent 66ee42dde1
commit 23468acf87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View file

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- Added `command-line` as an alternative to highlighted languages
## [1.1.1] - 2025-03-20
### Fixed

View file

@ -23,6 +23,7 @@ Command line code blocks are identified using one of the following languages:
| Name | Highlight | Prompt Pattern | Default Prompt | Continuation |
| -------------------- | ------------ | -------------- | -------------- | ------------ |
| `command-line` | N/A | Any below | `C:\>` | Any below |
| `batch-command` | `batch` | `/\S*?>/` | `C:\>` | `^` |
| `powershell-command` | `powershell` | `/\S*?>/` | `PS>` | `` ` `` |
| `shell-command` | `shell` | `/\S*?[#$%]/` | `$` | `\` |

View file

@ -34,6 +34,11 @@ const DEFAULT_SETTINGS: Partial<CommandLineSettings> = {
highlight: false,
normalize: false,
languages: {
"command-line": {
defaultPrompt: "C:\\>",
promptPattern: "^\\S*?[#$%>]\\s*",
continuationPattern: "[\\\\`^]$",
},
"batch-command": {
defaultPrompt: "C:\\>",
promptPattern: "^\\S*?>\\s*",