bug-texinfo
[Top][All Lists]
Advanced

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

Re: @verb and @w in DocBook output


From: Patrice Dumas
Subject: Re: @verb and @w in DocBook output
Date: Sat, 14 Jan 2023 10:55:03 +0100

On Fri, Jan 13, 2023 at 09:01:41PM +0000, Gavin Smith wrote:
> 
> Are there any thoughts on the change at the bottom of this mail?

Actually, it is not ok, if there is an @-command within the @w, the
spaces used in formatting will be replaced too.  Need to add a
state and do the substitution in the processing of 'text' type.  I can
do it.

> This changes the output to:
> 
> <para>yy |A&#160;A&#160;A&#160;B|<!-- /@w --> yy
> </para>
> 
> I also don't see much purpose in the /@w marker and think this could
> be removed from the output.
> 
> 
> diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
> index 54e6445744..967dff314c 100644
> --- a/tp/Texinfo/Convert/DocBook.pm
> +++ b/tp/Texinfo/Convert/DocBook.pm
> @@ -1013,6 +1013,8 @@ sub _convert($$;$)
>            pop @{$self->{'document_context'}};
>          }
>          if ($element->{'cmdname'} eq 'w') {
> +          $result =~ s/\n/ /g;
> +          $result =~ s/ +/$nbsp/g;
>            $result .= $w_command_mark;
>          }
>          return $result;
> 
> 
> 



reply via email to

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