Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String literals in comments interpret escape sequences #6977

Closed
vicuna opened this issue Sep 2, 2015 · 3 comments
Closed

String literals in comments interpret escape sequences #6977

vicuna opened this issue Sep 2, 2015 · 3 comments
Labels
Milestone

Comments

@vicuna
Copy link

@vicuna vicuna commented Sep 2, 2015

Original bug ID: 6977
Reporter: dsheets
Status: closed (set by @damiendoligez on 2016-02-03T12:44:26Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.02.3
Target version: 4.03.0+dev / +beta1
Fixed in version: 4.03.0+dev / +beta1
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @diml @hcarty

Bug description

Quoted source text accuracy in documentation comments is not preserved in the presence of escape sequences occurring within string literals.

This is incorrect behavior when the comment is intended contain example OCaml code which contains string literals which contain escape sequences.

Steps to reproduce

The interface:

val v : int
(**["\xC3"]*)

will result in a comment which contains

["_"]

where the underscores is replaced by byte 195.

Additional information

This issue was discovered by Daniel C. Bünzli.

@vicuna
Copy link
Author

@vicuna vicuna commented Oct 8, 2015

Comment author: dsheets

doligez: you have changed the category to OCamldoc as it concerns documentation but I believe the bug is in main OCaml parser code. Is that covered by "OCamldoc" category?

@vicuna
Copy link
Author

@vicuna vicuna commented Jan 29, 2016

Comment author: @damiendoligez

Good remark, now it's in the OCaml parser.

@vicuna
Copy link
Author

@vicuna vicuna commented Feb 3, 2016

Comment author: @damiendoligez

Fixed in trunk (commit 05d09f3).

@vicuna vicuna closed this as completed Feb 3, 2016
@vicuna vicuna added this to the 4.03.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant