Skip to content

Commit 27cc5fc

Browse files
not-my-profiletarleb
authored andcommitted
list-table: rename align attribute to aligns
1 parent e0ac5a4 commit 27cc5fc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

list-table/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ results in:
8181

8282
## Column alignments
8383

84-
With the `align` attribute you can configure column alignment. When given the
84+
With the `aligns` attribute you can configure column alignments. When given the
8585
value must specify an alignment character (`d`, `l`, `r`, or `c` for default,
8686
left, right or center respectively) for each column. The characters must be
8787
separated by commas.
8888

8989
```
90-
:::{.list-table align=l,c}
90+
:::{.list-table aligns=l,c}
9191
* - Name
9292
- Initial release
9393

list-table/list-table.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ local function get_colspecs(div_attributes, column_count)
1515
table.insert(colspecs, {pandoc.AlignDefault, nil})
1616
end
1717

18-
if div_attributes.align then
18+
if div_attributes.aligns then
1919
local alignments = {
2020
d = 'AlignDefault',
2121
l = 'AlignLeft',
2222
r = 'AlignRight',
2323
c = 'AlignCenter'
2424
}
2525
local i = 1
26-
for a in div_attributes.align:gmatch('[^,]') do
26+
for a in div_attributes.aligns:gmatch('[^,]') do
2727
assert(alignments[a] ~= nil,
2828
"unknown column alignment " .. tostring(a))
2929
colspecs[i][1] = alignments[a]
3030
i = i + 1
3131
end
32-
div_attributes.align = nil
32+
div_attributes.aligns = nil
3333
end
3434

3535
if div_attributes.widths then

list-table/sample.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- row 3, column 2
1212
:::
1313

14-
:::{.list-table align=l,c,r widths=1,2,3 #some-id .some-class}
14+
:::{.list-table aligns=l,c,r widths=1,2,3 #some-id .some-class}
1515
Here be some caption.
1616

1717
* - row 1, column 1

0 commit comments

Comments
 (0)