diff options
| author | Pg Biel <9021226+PgBiel@users.noreply.github.com> | 2023-04-26 05:03:34 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-26 10:03:34 +0200 |
| commit | ae4accc071aa811817dd27e906f7a20d00f23949 (patch) | |
| tree | 28049a92331ca0fc6029bf7eeb125168f3a2eaf6 /library/src | |
| parent | f740c0b03fbf2916c31044b5cec262835325d0c7 (diff) | |
Fix alignment of list markers & enum numbers (#988)
Diffstat (limited to 'library/src')
| -rw-r--r-- | library/src/layout/enum.rs | 3 | ||||
| -rw-r--r-- | library/src/layout/list.rs | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/library/src/layout/enum.rs b/library/src/layout/enum.rs index 76942c27..8814aba3 100644 --- a/library/src/layout/enum.rs +++ b/library/src/layout/enum.rs @@ -194,7 +194,8 @@ impl Layout for EnumElem { }; cells.push(Content::empty()); - cells.push(resolved); + // avoid '#set align' interference with the enum + cells.push(resolved.aligned(Align::LEFT_TOP.into())); cells.push(Content::empty()); cells.push(item.body().styled(Self::set_parents(Parent(number)))); number = number.saturating_add(1); diff --git a/library/src/layout/list.rs b/library/src/layout/list.rs index c8aeaa06..75228d95 100644 --- a/library/src/layout/list.rs +++ b/library/src/layout/list.rs @@ -129,7 +129,11 @@ impl Layout for ListElem { }; let depth = self.depth(styles); - let marker = self.marker(styles).resolve(vt, depth)?; + let marker = self + .marker(styles) + .resolve(vt, depth)? + // avoid '#set align' interference with the list + .aligned(Align::LEFT_TOP.into()); let mut cells = vec![]; for item in self.children() { |
