mirror of
https://github.com/sstallion/obsidian-command-line.git
synced 2026-07-22 05:42:07 +00:00
Add command-line as an alternative to highlighted languages (#15)
This commit is contained in:
parent
66ee42dde1
commit
23468acf87
3 changed files with 10 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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*?[#$%]/` | `$` | `\` |
|
||||
|
|
|
|||
|
|
@ -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*",
|
||||
|
|
|
|||
Loading…
Reference in a new issue