Skip to content

Whitespace management: remove excess whitespace in long quoted literals #83

@kouralex

Description

@kouralex

There already exists a whitespace trimming mechanism in Skosify, however, it does not take into account long quoted literals such as

""" This is an  example
of a long quoted
literal
which is     ridden    with   
   whitespace  
"""

in which the whitespace in the middle of the literal (between words and at line starts/endings) is preserved.
I would prefer the example above to be stripped into

"""This is an example
of a long quoted
literal
which is ridden with
whitespace"""

I believe that there could be an option that sets how whitespace is trimmed as sometimes whitespace may very well be intended and meaningful. At least line breaks are such a feature - I wonder what would be the best option for setting them as, for example, meaningful HTML entities. I can already think of two line breaks to be different from single one in these cases as well as in general.

Also, I wonder if long quoted literals could be switched into single quoted literals and vice versa (when applicable) based on an option, even though they yield the very same information.

Any thoughts on this, @osma ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions