bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #61607] [[PATCH] tbl/table.cpp: avoid creating a trailing space whe


From: Bjarni Ingi Gislason
Subject: [bug #61607] [[PATCH] tbl/table.cpp: avoid creating a trailing space when the last column is centered
Date: Thu, 2 Dec 2021 20:32:44 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

URL:
  <https://savannah.gnu.org/bugs/?61607>

                 Summary:  [[PATCH] tbl/table.cpp: avoid creating a trailing
space when the last column is centered
                 Project: GNU troff
            Submitted by: bjarniig
            Submitted on: Fri 03 Dec 2021 01:32:43 AM UTC
                Category: Preprocessor tbl
                Severity: 3 - Normal
              Item Group: New feature
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

>From d447f8bb823e9978d453eef38c203d6fa5ed044b Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Date: Fri, 3 Dec 2021 01:20:35 +0000
Subject: [PATCH] tbl/table.cpp: avoid creating a trailing space when the last
 column is centered

  Directory: src/preproc/

  The padding character is "^C" in ".fc ^B^C" ('^'
means a control character)

  Example:

.TS
c .
centered
.TE

/usr/bin/tbl <file> :

[...]
.fc ^B^C
[...]
.nr 3cl0 0*\n[3sep]
[...]
\&\h'|\n[3cl0]u'^B^Ccentered^C^B

  The last padding character is interpreted as a space character(?),
but is removed in "env.cpp" (strip trailing spaces) without reporting
it.

  The fix is to remove the last '^C'.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
---
 src/preproc/tbl/table.cpp | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

  The patch is in the attachment.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 03 Dec 2021 01:32:43 AM UTC  Name:
0001-tbl-table.cpp-avoid-creating-a-trailing-space-when-the.txt  Size: 4KiB  
By: bjarniig
patch for tbl/table.cpp project groff
<http://savannah.gnu.org/bugs/download.php?file_id=52418>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61607>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]