Skip to content

Commit

Permalink
Use 0, 2, 4, 6... for list indentation levels
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCVanB committed Sep 9, 2022
1 parent 4324592 commit de53e04
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 88 deletions.
1 change: 0 additions & 1 deletion .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ config:
no-emphasis-as-heading: false
no-inline-html: false
no-trailing-punctuation: false
ul-indent: false
ul-style: false

ignores:
Expand Down
6 changes: 3 additions & 3 deletions crates/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ From roc to render:
- The `ed_model` is filled in part with data obtained by loading and typechecking the roc file with the same function (`load_and_typecheck`) that is used by the compiler.
- `ed_model` also contains an `EdModule`, which holds the parsed abstract syntax tree (AST).
- In the `init_model` function:
+ The AST is converted into a tree of `MarkupNode`. The different types of `MarkupNode` are similar to the elements/nodes in HTML. A line of roc code is represented as a nested `MarkupNode` containing mostly text `MarkupNode`s. The line `foo = "bar"` is represented as
+ The AST is converted into a tree of `MarkupNode`. The different types of `MarkupNode` are similar to the elements/nodes in HTML. A line of roc code is represented as a nested `MarkupNode` containing mostly text `MarkupNode`s. The line `foo = "bar"` is represented as
three text `MarkupNode`; representing `foo`, ` = ` and `bar`. Multiple lines of roc code are represented as nested `MarkupNode` that contain other nested `MarkupNode`.
+ `CodeLines` holds a `Vec` of `String`, each line of code is a `String`. When saving the file, the content of `CodeLines` is written to disk.
+ `GridNodeMap` maps every position of a char of roc code to a `MarkNodeId`, for easy interaction with the caret.
+ `CodeLines` holds a `Vec` of `String`, each line of code is a `String`. When saving the file, the content of `CodeLines` is written to disk.
+ `GridNodeMap` maps every position of a char of roc code to a `MarkNodeId`, for easy interaction with the caret.
- Back in `editor/src/editor/main.rs` we convert the `EdModel` to `RenderedWgpu` by calling `model_to_wgpu`.
- The `RenderedWgpu` is passed to the `glyph_brush` to draw the characters(glyphs) on the screen.

Expand Down
Loading

0 comments on commit de53e04

Please sign in to comment.