[m-rev.] for review: add character escapes in string_to_doc/1

Julien Fischer jfischer at opturion.com
Tue Jul 17 13:58:31 AEST 2018



On Tue, 17 Jul 2018, Peter Wang wrote:

> On Tue, 17 Jul 2018 12:12:39 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
>>
>> For review by anyone.
>>
>> ---------------------------------
>>
>> Add character escapes in string_to_doc/1.
>>
>> library/string.m:
>>      In adddition to surrounding the argument of string_to_doc/1 with double
>>      quotes, also add the usual character escapes.
>
> addition

Fixed.

>> tests/declarative_debugger/sort.exp:
>>      Conform to the above change.
>>
>> NEWS:
>>      Announce this change.
>>
>> Julien.
>>
>> diff --git a/NEWS b/NEWS
>> index ec6af97..882c4bd 100644
>> --- a/NEWS
>> +++ b/NEWS
>> @@ -314,6 +314,9 @@ Changes to the Mercury standard library:
>>
>>   * We have reduced the memory allocated by string.to_lower and string.to_upper.
>>
>> +* string.string_to_doc/1 now inserts any required character escapes in its
>> +  argument, in addition to surrouding it with double quotes.
>> +
>
> surrounding
>
> I suggest:
>
> * string.string_to_doc/1 now replaces characters in its input argument
>  with backslash escapes when required.

Ok, replaced with your wording.

Thank Peter!

Julien.


More information about the reviews mailing list