Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 1709 by [email protected]: literal continuation rows
http://code.google.com/p/robotframework/issues/detail?id=1709

I would like to be able to use special markup in a row to say that it is a continuation row, but that the data following the continuation character(s) shouldn't be parsed any further. I recommend this markup be {{{:::}}} (ie: three colons), though other characters could be considered.

I try to encourage people on my team to document their keywords. For reusable keywords I recommend adding an example, since in my experience people often struggle with using keywords they haven't written. However, this becomes very tedious to write, since the example usually includes text that uses the same separators and robot syntax as the actual keyword. To get this to work, we have to escape the separators in the documentation, leading to documentation that is hard to write and a little clunky looking. For example:

{{{
*** Keywords ***
| My clever keyword
| | [Documentation]
| | ... | blah blah
| | ... | Example:
| | ... | \| \| My clever keyword \| argument 1 \| argument 2
}}}

If someone forgets to escape a pipe, robot will parse the row and join the cells with spaces, yielding examples that don't make sense. There is a similar problem with tab or space separated format as well, making it difficult to create examples in the same format used in that file.

If we allow three single colons in addition to the three dots, the example becomes both easier to write and easier to read:

*** Keywords ***
| My clever keyword
| | [Documentation]
| | ::: | blah blah
| | ::: | Example:
| | ::: | | | My clever keyword | argument 1 | argument 2
}}}

The idea is that if the three quotes appears where three dots appears, robot stops parsing at the next separator, and everything following that becomes the literal value of that cell for that row.

Making such a change would likely be 100% backwards compatible, since the only thing this would break is if someone had a keyword literally named {{{:::}}}, which is highly unlikely. Also, the change would be relatively simple to make, as the special case for handling {{{...}}} is isolated to just a couple of functions.



--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to