Skip to content

Commit 53d8ede

Browse files
authored
New heading styles, rendering improvements and snapshot tests (#47)
2 parents c160173 + 747f39f commit 53d8ede

14 files changed

Lines changed: 543 additions & 75 deletions

Cargo.lock

Lines changed: 43 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ TUI Application to manage Obsidian vaults and notes directly from the terminal
1010

1111
## Installation
1212

13-
For now unfortunately, you have to compile this binary yourself, if you want to run basalt. The next thing I'll be doing is adding a GitHub workflow to produce cross-platform binaries.
14-
1513
Install basalt using cargo:
1614

1715
```sh
1816
cargo install basalt-tui
1917
```
2018

19+
Or use the precompiled binaries from the latest basalt release.
20+
2121
## Background
2222

2323
This is something that has been brewing in my head for quite some time. There has been different incarnations over the years, however, nothing as substantial as this.
@@ -60,18 +60,20 @@ For now these are not configurable, but this will change when the configuration
6060
- [x] Add help modal / popup with `?`
6161
- [x] Add vault selection screen with basalt logo (Splash screen)
6262
- [x] Add vault selector modal
63-
- [-] GitHub Workflows !
63+
- [x] GitHub Workflows !
6464
- [x] Run tests and build
6565
- [x] Run create release artifacts (cross-platform binaries)
6666
- [ ] Do not run test when pushing a tag
6767
- [ ] Run `vhs` when basalt directory changes and commit it to the current PR
68+
- [ ] Run cargo publish in release workflow for basalt-tui
69+
- [ ] Add Homebrew formula
6870
- [ ] Add `mdbook` and `gh` pages
6971
- [ ] Persistent scroll state in help modal
7072
- [ ] Fuzzy search in panes (note, side panel, modals)
71-
- [ ] Markdown rendering
73+
- [-] Markdown rendering
7274
- [ ] Add support to all markdown nodes
73-
- [ ] Improve and fix code block rendering, so it appears as a 'block'
7475
- [x] Add text formatting to different styles like `Fraktur` and `DoubleStruck` for heading purposes
76+
- [x] Improve and fix code block rendering, so it appears as a 'block'
7577
- [ ] Support complete Obsidian Flavor
7678
- [ ] Add image rendering support
7779
- [ ] Note tree

basalt/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 0.5.0 (2025-05-25)
4+
5+
### Fixed
6+
7+
- [Support deeper block quotes with proper prefix recursion](https://github.com/erikjuhani/basalt/commit/3f1ed73a0edcfbb17800cb27d7bda145b93369f6)
8+
- [Add two space indentation to list items](https://github.com/erikjuhani/basalt/commit/b1a021e25759c39cee00cd1b787ccfafa1ad4ad4)
9+
- [Fix code block rendering](https://github.com/erikjuhani/basalt/commit/cae8fae154d7a6da2ec0ffb6b28ac85b2cc73023)
10+
11+
### Changed
12+
13+
- [Change Markdown headings to stylized variants](https://github.com/erikjuhani/basalt/commit/30321916b5d6f79afe2a58f9b45b6eaa963ac12e)
14+
315
## 0.4.1 (2025-05-25)
416

517
### Changed

basalt/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Basalt TUI application for Obsidian notes.
66
readme = "../README.md"
77
repository = "https://github.com/erikjuhani/basalt"
88
license = "MIT"
9-
version = "0.4.1"
9+
version = "0.5.0"
1010
edition = "2021"
1111

1212
[dependencies]
@@ -19,6 +19,7 @@ textwrap = "0.16.2"
1919

2020
[dev-dependencies]
2121
indoc = "2"
22+
insta = "1.43.1"
2223

2324
[[bin]]
2425
name = "basalt"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: basalt/src/markdown/view.rs
3+
expression: terminal.backend()
4+
---
5+
"╭──────────────────────────────────────────────────────────────────────────────▲"
6+
"│ Quotes █"
7+
"│ ════════════════════════════════════════════════════════════════════════════ █"
8+
"│ You can quote text by adding a > symbols before the text. █"
9+
"│ █"
10+
"│ ┃ Human beings face ever more complex and urgent problems, and their █"
11+
"│ ┃ effectiveness in dealing with these problems is a matter that is critical █"
12+
"│ ┃ to the stability and continued progress of society. █"
13+
"│ ┃ █"
14+
"│ ┃ - Doug Engelbart, 1961 █"
15+
"│ █"
16+
"│ █"
17+
"│ █"
18+
"│ ║"
19+
"│ ║"
20+
"│ ║"
21+
"│ ║"
22+
"│ ║"
23+
"│ ║"
24+
"╰──────────────────────────────────────────────────────────────────────────────▼"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: basalt/src/markdown/view.rs
3+
expression: terminal.backend()
4+
---
5+
"╭──────────────────────────────────────────────────────────────────────────────▲"
6+
"│ Callout Blocks █"
7+
"│ ════════════════════════════════════════════════════════════════════════════ █"
8+
"│ ┃ You can turn your quote into a callout by adding [!info] as the first line █"
9+
"│ ┃ in a quote. █"
10+
"│ █"
11+
"│ █"
12+
"│ █"
13+
"│ █"
14+
"│ █"
15+
"│ █"
16+
"│ █"
17+
"│ █"
18+
"│ █"
19+
"│ █"
20+
"│ █"
21+
"│ ║"
22+
"│ ║"
23+
"│ ║"
24+
"╰──────────────────────────────────────────────────────────────────────────────▼"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: basalt/src/markdown/view.rs
3+
expression: terminal.backend()
4+
---
5+
"╭──────────────────────────────────────────────────────────────────────────────▲"
6+
"│ Deep Quotes █"
7+
"│ ════════════════════════════════════════════════════════════════════════════ █"
8+
"│ You can have deeper levels of quotes by adding a > symbols before the text █"
9+
"│ inside the block quote. █"
10+
"│ █"
11+
"│ ┃ Regular thoughts █"
12+
"│ ┃ █"
13+
"│ ┃ ┃ Deeper thoughts █"
14+
"│ ┃ ┃ █"
15+
"│ ┃ ┃ ┃ Very deep thoughts █"
16+
"│ ┃ ┃ ┃ █"
17+
"│ ┃ ┃ ┃ - Someone on the internet 1996 ║"
18+
"│ ┃ ║"
19+
"│ ┃ Back to regular thoughts ║"
20+
"│ ║"
21+
"│ ║"
22+
"│ ║"
23+
"│ ║"
24+
"╰──────────────────────────────────────────────────────────────────────────────▼"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: basalt/src/markdown/view.rs
3+
expression: terminal.backend()
4+
---
5+
"╭──────────────────────────────────────────────────────────────────────────────▲"
6+
"│ Lists █"
7+
"│ ════════════════════════════════════════════════════════════════════════════ █"
8+
"│ You can create an unordered list by adding a -, *, or + before the text. █"
9+
"│ █"
10+
"│ - First list item █"
11+
"│ - Second list item █"
12+
"│ - Third list item █"
13+
"│ █"
14+
"│ To create an ordered list, start each line with a number followed by a . █"
15+
"│ symbol. █"
16+
"│ █"
17+
"│ 1. First list item ║"
18+
"│ 2. Second list item ║"
19+
"│ 3. Third list item ║"
20+
"│ ║"
21+
"│ ║"
22+
"│ ║"
23+
"│ ║"
24+
"╰──────────────────────────────────────────────────────────────────────────────▼"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: basalt/src/markdown/view.rs
3+
expression: terminal.backend()
4+
---
5+
"╭──────────────────────────────────────────────────────────────────────────────▲"
6+
"│ Indented Lists █"
7+
"│ ════════════════════════════════════════════════════════════════════════════ █"
8+
"│ Lists can be indented █"
9+
"│ █"
10+
"│ - First list item █"
11+
"│ - Second list item █"
12+
"│ - Third list item █"
13+
"│ █"
14+
"│ █"
15+
"│ █"
16+
"│ █"
17+
"│ █"
18+
"│ █"
19+
"│ ║"
20+
"│ ║"
21+
"│ ║"
22+
"│ ║"
23+
"│ ║"
24+
"╰──────────────────────────────────────────────────────────────────────────────▼"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: basalt/src/markdown/view.rs
3+
expression: terminal.backend()
4+
---
5+
"╭──────────────────────────────────────────────────────────────────────────────▲"
6+
"│ Task lists █"
7+
"│ ════════════════════════════════════════════════════════════════════════════ █"
8+
"│ To create a task list, start each list item with a hyphen and space followed █"
9+
"│ by [ ]. █"
10+
"│ █"
11+
"│ ■ This is a completed task. █"
12+
"│ □ This is an incomplete task. █"
13+
"│ █"
14+
"│ ┃ You can use any character inside the brackets to mark it as complete. █"
15+
"│ █"
16+
"│ ■ Oats █"
17+
"│ ■ Flour ║"
18+
"│ ■ Apples ║"
19+
"│ ║"
20+
"│ ║"
21+
"│ ║"
22+
"│ ║"
23+
"│ ║"
24+
"╰──────────────────────────────────────────────────────────────────────────────▼"

0 commit comments

Comments
 (0)