Skip to content

Commit

Permalink
Add iteration scope for markdown items (#2135)
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey authored Dec 14, 2023
1 parent c6f5600 commit 730349d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
languageId: markdown
command:
version: 6
spokenForm: change every item
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: everyScope
scopeType: {type: collectionItem}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
ddd eee:
- aaa
- bbb
- ccc
fff ggg:
- hhh
- iii
selections:
- anchor: {line: 4, character: 5}
active: {line: 4, character: 5}
marks: {}
finalState:
documentContents: |-
ddd eee:
-
-
-
fff ggg:
- hhh
- iii
selections:
- anchor: {line: 2, character: 2}
active: {line: 2, character: 2}
- anchor: {line: 3, character: 2}
active: {line: 3, character: 2}
- anchor: {line: 4, character: 2}
active: {line: 4, character: 2}
2 changes: 2 additions & 0 deletions queries/markdown.scm
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@
(#trim-end! @_.domain)
(#insertion-delimiter! @collectionItem "\n")
)

(list) @collectionItem.iteration

0 comments on commit 730349d

Please sign in to comment.