Skip to content

Commit

Permalink
fix: use of dropped constant in setting vline
Browse files Browse the repository at this point in the history
Leftover of 85d3712 (refactor: use quarks to distinguish dash from text,
2024-04-06).
  • Loading branch information
muzimuzhi committed Nov 28, 2024
1 parent a452fac commit a9b5d5a
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tabularray/tabularray.sty
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@
\group_begin:
\keys_set_groups:nnn { tblr/__vline } { text } {#3}
\tl_if_eq:NnF \l__tblr_vline_dash_tl
{ \exp_not:n { \c__tblr_text_tl } }
{ \exp_not:n { \q__tblr_text } }
{
\__tblr_set_vline_num:n {#1}
\tl_clear:N \l__tblr_vline_dash_tl
Expand Down
41 changes: 41 additions & 0 deletions tabularray/testfiles/tblr-hvline.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
\input{regression-test}
\documentclass{article}

\usepackage{tabularray}

\ExplSyntaxOn
\debug_on:n { check-declarations , check-expressions , deprecation }
% skip table typesetting
\cs_gset_eq:NN \__tblr_build_whole: \prg_do_nothing:
\ExplSyntaxOff

\begin{document}

\START

\SetTblrTracing{+hline,+vline}

\BEGINTEST{Empty hline/vline text}
\begin{tblr}{
hlines, vlines,
hline{1}={text=},
vline{1}={text=},
}
a
\end{tblr}
\ENDTEST

% lvjr/tabularray#303
\BEGINTEST{Fragile hline/vline text}
\begin{tblr}{
hlines, vlines,
hline{1}={text={\def\x{}\small\rlap{--h--}}},
vline{1}={text={\clap{\textbf{v}}}},
}
a
\end{tblr}
\ENDTEST

\END

\end{document}
56 changes: 56 additions & 0 deletions tabularray/testfiles/tblr-hvline.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
============================================================
TEST 1: Empty hline/vline text
============================================================
> The spec list hline_1 contains the pairs:.
> {[1]/@hline-count} => {1}.
> {[2]/@hline-count} => {1}.
> {[1]/@hline-count} => {1}.
> {[1][1](1)/@dash} => {\q__tblr_dash solid}.
> {[2]/@hline-count} => {1}.
> {[2][1](1)/@dash} => {\q__tblr_dash solid}.
> {[1](1)/@hline-height} => {0.4pt}.
> {[1]/@hline-height} => {0.4pt}.
> {[2](1)/@hline-height} => {0.4pt}.
> {[2]/@hline-height} => {0.4pt}.
> The spec list vline_1 contains the pairs:.
> {[1]/@vline-count} => {1}.
> {[2]/@vline-count} => {1}.
> {[1]/@vline-count} => {1}.
> {[1][1](1)/@dash} => {\q__tblr_dash solid}.
> {[2]/@vline-count} => {1}.
> {[1][2](1)/@dash} => {\q__tblr_dash solid}.
> {[1](1)/@vline-width} => {0.4pt}.
> {[1]/@vline-width} => {0.4pt}.
> {[2](1)/@vline-width} => {0.4pt}.
> {[2]/@vline-width} => {0.4pt}.
============================================================
============================================================
TEST 2: Fragile hline/vline text
============================================================
> The spec list hline_1 contains the pairs:.
> {[1]/@hline-count} => {1}.
> {[2]/@hline-count} => {1}.
> {[1]/@hline-count} => {1}.
> {[1][1](1)/@dash} => {\q__tblr_text \def \x {}\small \rlap {--h--}}.
> {[2]/@hline-count} => {1}.
> {[2][1](1)/@dash} => {\q__tblr_dash solid}.
> {[1](1)/@hline-height} => {6.19849pt}.
> {[1]/@hline-height} => {6.19849pt}.
> {[2](1)/@hline-height} => {0.4pt}.
> {[2]/@hline-height} => {0.4pt}.
> The spec list vline_1 contains the pairs:.
> {[1]/@vline-count} => {1}.
> {[2]/@vline-count} => {1}.
> {[1]/@vline-count} => {1}.
> {[1][1](1)/@dash} => {\q__tblr_text \clap {\textbf {v}}}.
> {[2]/@vline-count} => {1}.
> {[1][2](1)/@dash} => {\q__tblr_dash solid}.
> {[1](1)/@vline-width} => {0.0pt}.
> {[1]/@vline-width} => {0.0pt}.
> {[2](1)/@vline-width} => {0.4pt}.
> {[2]/@vline-width} => {0.4pt}.
============================================================
***************
[test] 0 error(s) encountered.

0 comments on commit a9b5d5a

Please sign in to comment.