robotframework-tidy icon indicating copy to clipboard operation
robotframework-tidy copied to clipboard

Feature Request: Remove \ when 2 spaces in documentation or comment

Open emakaay opened this issue 4 years ago • 2 comments

Hello,

I came across some robot code which had the following construction in documentation and/or comments [documentation] this function \ adds two numbers, and return \ sum The only reason these \ are here is to prevent that part of documentation (or comment) is seen as an extra argument. I think in 99.9 % of the cases only a single space is required(and the \ is obsolete).

There could be a transformator(RemoveObsoleteSpacesInDocumentsOrComments) that removes these \ signs. Making documentation and comment more readable.

In the case the backslash is required, there is already some mechanics in place to skip transforming files. The only problem remains when 1 file contains 2 keywords for instance. In 1 method there is a required \ character, and in another method it can be removed.

What do you think ?

emakaay avatar Aug 19 '21 20:08 emakaay

I Would like to add, this is a minor issue in the code. Other transformers should get attention first. No hurry at all

emakaay avatar Aug 19 '21 20:08 emakaay

Thank you for feature request. It looks simple to implement. I will do some research to see if it will be easy to find cases when \ is necessary and when \ is not needed and can be removed.

bhirsz avatar Aug 23 '21 07:08 bhirsz