Properly handle \r\n pairs in doc-comments.
This commit is contained in:
parent
d58df1fb34
commit
f0781c9736
@ -16,6 +16,7 @@ Bug fixes
|
||||
* `remove` for arrays and BLOB's now treat negative index correctly.
|
||||
* `parse_int` now works properly for negative numbers.
|
||||
* `Engine::gen_fn_signatures` now generates signatures for external packages registered via `Engine::register_global_module`.
|
||||
* `\r\n` pairs are now recognized correctly for doc-comments.
|
||||
|
||||
Enhancements
|
||||
------------
|
||||
|
@ -1594,7 +1594,7 @@ fn get_next_token_inner(
|
||||
eat_next(stream, pos);
|
||||
pos.new_line();
|
||||
// `\r\n
|
||||
if stream.peek_next().map(|ch| ch == '\n').unwrap_or(false) {
|
||||
if let Some('\n') = stream.peek_next() {
|
||||
eat_next(stream, pos);
|
||||
}
|
||||
}
|
||||
@ -1761,6 +1761,14 @@ fn get_next_token_inner(
|
||||
};
|
||||
|
||||
while let Some(c) = stream.get_next() {
|
||||
if c == '\r' {
|
||||
pos.new_line();
|
||||
// \r\n
|
||||
if let Some('\n') = stream.peek_next() {
|
||||
eat_next(stream, pos);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if c == '\n' {
|
||||
pos.new_line();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user