oslo.policy/oslo_policy
Stephen Finucane bc9a91d8b7 generator: Reimplement wrapping of 'description'
The current implementation of wrapping for the Policy.description field
leaves a lot to be desired. It takes each line in the original
description independently and wraps that, ignoring the fact that the
line may be part of a paragraph, or could be a literal that shouldn't be
wrapped. As an example, imagine that wrapping occurred at 40
characters instead of 70. In this case, the below:

    A sample lines with more than forty characters
    which continues down onto the next line.

would become:

    A sample lines with more than forty
    characters
    which continues down onto the next line.

when clearly, what we want is something like this:

    A sample lines with more than forty
    characters which continues down onto the
    next line.

This is resolved.

In addition, it should be possible to include basic literal blocks and
those should be preserved. For example:

    Here's a sample literal block

        This is a really long literal block but it should not wrap

should be output in the exact same way. This is also resolved.

Note that we're not accounting for things like bullet points. Doing so
would bring us close to rST parser implementation territory, and we
don't want to go there. We can revisit this if someone turns out to want
this feature.

Change-Id: I3ea2aac73e3c0a4f77f3f4097540de01264cd618
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-06-08 18:41:24 +01:00
..
locale/en_GB/LC_MESSAGES Imported Translations from Zanata 2018-03-01 06:47:29 +00:00
tests generator: Reimplement wrapping of 'description' 2018-06-08 18:41:24 +01:00
__init__.py exported from oslo-incubator by graduate.sh 2014-12-09 14:40:01 -03:00
_cache_handler.py Add missing parameter description in module _cache_handler 2016-11-02 02:39:38 +00:00
_checks.py Handle deprecation of inspect.getargspec 2017-11-21 12:55:11 -06:00
_external.py http/https check rules as stevedore extensions 2017-10-05 08:40:47 -04:00
_i18n.py Update URLs in documents according to document migration 2017-07-12 23:01:31 +08:00
_parser.py http/https check rules as stevedore extensions 2017-10-05 08:40:47 -04:00
fixture.py http/https check rules as stevedore extensions 2017-10-05 08:40:47 -04:00
generator.py generator: Reimplement wrapping of 'description' 2018-06-08 18:41:24 +01:00
opts.py Add configuration option for enforcing scope 2017-12-20 17:05:02 +00:00
policy.py Fix document formatting 2018-05-18 15:54:31 +09:00
shell.py Remove dead code and use default value of argparse. 2017-01-02 11:21:44 +01:00
sphinxext.py Update sphinxext to include scope_types in docs 2018-06-01 19:50:53 +00:00
sphinxpolicygen.py make the sphinxpolicygen extension handle multiple input/output files 2018-04-30 10:11:21 -04:00
version.py pbr.version.VersionInfo needs package name (oslo.xyz and not oslo_xyz) 2017-02-06 12:49:22 -05:00