Note kit command
file.setLineEndings
Set the line endings
Sets the file's line endings to LF or CRLF and whether it starts with a byte order mark; the text is otherwise unchanged. Answers the line style the file has now.
- Kit
- Note 0.3.0 (Markdown (.md))
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
bom | boolean | no | Write a UTF-8 byte order mark; unchanged by default. |
eol | "lf" | "crlf" | yes | LF or CRLF for every line. |
Call through note_run
text
note_run {
"path": "<file>.md",
"steps": [{ "command": "file.setLineEndings", "params": { "eol": <"lf" | "crlf"> } }]
}The required parameters, with placeholders for their types: not a tested example. Optional: bom. note_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
bom | boolean | yes | Whether the file starts with a byte order mark. |
changed | boolean | yes | Whether the file changed. |
eol | "lf" | "crlf" | yes | The line endings the file has now. |
Result JSON Schema
json
{
"additionalProperties": false,
"properties": {
"bom": {
"description": "Whether the file starts with a byte order mark.",
"type": "boolean"
},
"changed": {
"description": "Whether the file changed.",
"type": "boolean"
},
"eol": {
"description": "The line endings the file has now.",
"enum": [
"lf",
"crlf"
],
"type": "string"
}
},
"required": [
"bom",
"changed",
"eol"
],
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"bom": {
"description": "Write a UTF-8 byte order mark; unchanged by default.",
"type": "boolean"
},
"eol": {
"description": "LF or CRLF for every line.",
"enum": [
"lf",
"crlf"
],
"type": "string"
}
},
"required": [
"eol"
],
"type": "object"
}Generated from kition-sdk packages/script/kits/note.ts and the kit itself (kition-note@69e14d9). As data: commands.jsonl.