mvertes / txt2man

txt2man converts text to man page
GNU General Public License v2.0
57 stars 10 forks source link

Odd formatting for tag list #33

Closed HalosGhost closed 2 years ago

HalosGhost commented 4 years ago

In the below example I've put together, <no argument> is emphasized as I expect, but env is underlined rather than set in-bold. At first, I thought this might be because env is so short, but even when I lengthen it to any length (even longer than <no argument>), it has no change.

What am I missing?

NAME
enlighten - a command-line tool to manage sysfs-exposed backlights

SYNOPSIS
enlighten [ env | help | list | version | [=+-]<#>[%] ]

DESCRIPTION
enlighten enables simple, scriptable control of any backlight that follows the standard sysfs backlight structure.

OPTIONS
<no argument>  
  Display current brightness information (consistently formatted as ``cur / max (perc)'').

env  
  Print all environment variables (see CONFIGURATION) that enlighten reads and their values.
HalosGhost commented 4 years ago

Upon a bit more testing, I was initially incorrect, and lengthening that string to as long as <no argument> indeed renders it in-bold. However, env is actually as long as I want it to be. Is there a way to force bold formatting in this circumstance?

thmo commented 2 years ago

It is underlined because it appears as an argument in the synopsis. If it doesn't match an argument, it is formatted in bold because the spaces following it make it the defining term of a tag list.

HalosGhost commented 2 years ago

Mmm, so it automatically pulls things out of the synopsis. That's kind of unexpected but understandable. Thanks for the clarification!