Skip to content

Commit

Permalink
fix swap lines commands
Browse files Browse the repository at this point in the history
  • Loading branch information
masaki39 committed Apr 24, 2024
1 parent 8bec95a commit 0a44e84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ export default class OutlineConverter extends Plugin {
const lineAbove = editor.getLine(cursor.line - 1);

if (line.trim().startsWith(`- `) && lineAbove.trim().startsWith(`- `)) {
commands.executeCommandById("obsidian-outliner:move-list-item-up");
commands.executeCommandById(commandId);
} else {
editor.exec("swapLineUp");
}
Expand Down Expand Up @@ -298,7 +298,7 @@ export default class OutlineConverter extends Plugin {

// Check if both current line and the line below start with "- "
if (line.trim().startsWith(`- `) && lineBelow.trim().startsWith(`- `)) {
commands.executeCommandById("obsidian-outliner:move-list-item-down");
commands.executeCommandById(commandId);
} else {
editor.exec("swapLineDown");
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "outline-converter",
"name": "Outline Converter",
"version": "1.1.0",
"version": "1.1.1",
"minAppVersion": "1.5.12",
"description": "Convert outline to continuous text.",
"author": "masaki39",
Expand Down

0 comments on commit 0a44e84

Please sign in to comment.