Skip to content

Commit

Permalink
Indentation fix in nested lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Breck Yunits authored and Breck Yunits committed Nov 4, 2023
1 parent 0fa78cb commit b158562
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grammar/list.grammar
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ listAftertextParser
const isStartOfList = index === 0 || !(parent.nodeAt(index - 1) instanceof nodeClass)
const isEndOfList = parent.length === index + 1 || !(parent.nodeAt(index + 1) instanceof nodeClass)
const { listType } = this
return (isStartOfList ? `<${listType} style="text-indent:${(this.getIndentLevel() - 1) * 20}px;"${this.attributes}>` : "") + `${super.compile()}` + (isEndOfList ? `</${listType}>` : "")
return (isStartOfList ? `<${listType} ${this.attributes}>` : "") + `${super.compile()}` + (isEndOfList ? `</${listType}>` : "")
}
get attributes() {
return ""
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scroll-cli",
"version": "72.4.2",
"version": "72.4.3",
"description": "Tools for thoughts.",
"main": "scroll.js",
"engines": {
Expand Down
3 changes: 3 additions & 0 deletions releaseNotes.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ title Scroll Release Notes

startColumns

# 72.4.3 11/04/2023
- 🏥 fix extra indentation in nested lists. Browser already adds it.

# 72.4.2 11/04/2023
- 🏥 do not compile aftertext nodes having the "hidden" attribute

Expand Down
4 changes: 4 additions & 0 deletions tests/kitchenSink/lists.scroll
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- This is a test
- Of nested
- Indentation
- Level 4

0 comments on commit b158562

Please sign in to comment.