Skip to content

Commit 3c77c07

Browse files
committed
improve resizable-table
1 parent a5541c4 commit 3c77c07

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

resizer/plugin.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Resizer",
44
"description": "General-purpose resizer widget for TiddlyWiki5",
55
"author": "Simon Huber",
6-
"version": "0.4.15",
6+
"version": "0.4.16",
77
"core-version": ">=5.3.0",
88
"source": "https://github.com/BurningTreeC/resizer",
99
"plugin-type": "plugin",

resizer/ui/panels/panels.tid

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ code-body: yes
550550

551551
<!-- Maps a table to its rowspans -->
552552
\function col.map(table,fn)
553-
[<table>splitregexp[\n]function<fn>split[|]butfirst[]butlast[]join[ ]enlist-input:raw[]]
553+
[<table>splitregexp[\n]function<fn>split[|]butfirst[]butlast[]format:titlelist[]]
554554
:map:flat[<index>remainder<columns>match<previousColIndex>then<currentTiddler>]
555555
:and[!match[]join[|]] :and[addprefix[|]addsuffix[|]]
556556
:map[<currentTiddler>fn.sanitize[]]
@@ -579,7 +579,7 @@ code-body: yes
579579

580580
\function tf.get.table.cell(fn) [function[tf.row.split.regexp]function<fn>nth<rowIndex>split[|]butfirst[]butlast[]nth<colIndex>]
581581
\function tf.get.table.cell.align()
582-
[<tableCell>regexp[^\s.*\s$]then[center]]
582+
[<tableCell>regexp<alignCenterRegexp>then[center]]
583583
:else[<tableCell>regexp<alignRightRegexp>then[right]]
584584
:else[<tableCell>regexp<alignLeftRegexp>then[left]]
585585
\end
@@ -720,8 +720,9 @@ code-body: yes
720720
caption={{{ [<wikitextTable>!is[blank]then<tf.row.split.regexp.get.caption>] :else[<wikitextTable>is[blank]then<dataTiddler>!is[blank]then<tf.data.tiddler.get.caption>] :else[<caption>!is[blank]] :else[[]] }}}
721721
wikitextClasses={{{ [<wikitextTable>!is[blank]then<tf.row.split.regexp>suffix[|k]split[|]butfirst[]butlast[]first[]] :else[<wikitextTable>is[blank]then<dataTiddler>!is[blank]then<tf.data.tiddler.get.classes>] :else[[]] }}}
722722
columnsMinusOne={{{ [<columns>subtract[1]] }}}
723-
alignRightRegexp="^\s.*[^\s]$"
724-
alignLeftRegexp="^[^\s].*\s$"
723+
alignCenterRegexp="^(?:[\^,])?\s.*\s$"
724+
alignRightRegexp="^(?:[\^,])?\s.*[^\s]$"
725+
alignLeftRegexp="^[^\s](?:[\^,])?.*\s$"
725726
alignTopRegexp="^(\^|&#94;).*"
726727
alignBottomRegexp="^(,|&#44;).*"
727728
alignStripTopRegexp="^(\^|&#94;)"

0 commit comments

Comments
 (0)