Re: [PATCH 00/10] add support for sphinx-doc

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

 



On Wed, Feb 28, 2018 at 11:36:50AM -0800, Randy Dunlap wrote:
> On 02/23/2018 05:47 PM, Luc Van Oostenryck wrote:
> 
> +	@sed '/^\.BI \\-[a-zA-Z]\\fB /s/\\fB //' < build/man/$@ > $@
> 
> I would prefer to see a little explanation of that sed magic, if you don't mind.

Yes, sure. For the moment, the comments are minimalist because it's
still very much work in progress.
This sed magic is because sphinx parse options with a single dash
(and without '=') as:
	'-' <one letter option name> <option argument>*
and the writers try to display the dash and the option name
in bold and the arguments in italic. This is very good for some
styles/options, like '-lsparse' bit I find it quite strange
looking for GCC/sparse options like '-Wunknown-attribute' and
even more for '-fmax-error=1000'.

The sed magic here allow to see the man page with the whole
option in bold (I'm not sure about if the change is good,
just that the result look good).

However, I have no strong feeling about it and would much
prefer to not have to do any sed magic/to be able to use
the output without any changes.

Of course, I'll move this explanation in the patch description.
I'll send a new version in a few days.


One thing which annoys me much more than this bold/italic
for one-dash+one-letter-option+argument is that in some cases
sphinx doesn't seems to recognize some of the option-lists.
The problem can be seen at:
 http://sparse-doc.readthedocs.io/en/latest/sparse.html#misc-options
(compare the indentation with the previous section or the next one:
 http://sparse-doc.readthedocs.io/en/latest/sparse.html#debug-options

Thanks for the feedback.
-- Luc
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux