Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#14037 closed defect (fixed)

whitespace should be normalized in variant descriptions before being shown

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone: MacPorts 1.7.0
Component: base Version: 1.7.0
Keywords: Cc: raimue (Rainer Müller)
Port:

Description

If I define a variant description like this:

variant foo description {foodesc} {
    ...
}

then the description shows up properly in "port variants <portname>". However if I define it this way:

variant foo description { foodesc } {
    ...
}

then the extra whitespace before and after the description is actually shown by "port variants <portname>".

Also, if I use multiple spaces next to one another, or continue a description onto the next line, like this

variant foo description { here  is    a \
                          long description } {
    ...
}

then these extra spaces are output verbatim in the "port variants <portname>" command. This is in contrast with the port's long description, where port seems to strip leading and trailing whitespace and normalize runs of more than one whitespace character to a single space.

This ticket is for the request to change "port variants <portname>" so that it, too, normalizes whitespace in the variant description, just like "port info <portname>" already does for the port's long description. If the request in this ticket is implemented, then #14031 isn't needed and should be closed as "wontfix".

Change History (5)

comment:1 Changed 17 years ago by raimue (Rainer Müller)

I implemented this in r33289. Please test!

comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to raimue@…

Wow, I didn't realize it would be that easy. Thanks! Works great as far as I can tell.

comment:3 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

comment:4 Changed 16 years ago by tobypeterson

Milestone: MacPorts base bugsMacPorts Future

Milestone MacPorts base bugs deleted

comment:5 Changed 15 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 1.7.0
Note: See TracTickets for help on using tickets.