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.
|
* `remove` for arrays and BLOB's now treat negative index correctly.
|
||||||
* `parse_int` now works properly for negative numbers.
|
* `parse_int` now works properly for negative numbers.
|
||||||
* `Engine::gen_fn_signatures` now generates signatures for external packages registered via `Engine::register_global_module`.
|
* `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
|
Enhancements
|
||||||
------------
|
------------
|
||||||
|
@ -1594,7 +1594,7 @@ fn get_next_token_inner(
|
|||||||
eat_next(stream, pos);
|
eat_next(stream, pos);
|
||||||
pos.new_line();
|
pos.new_line();
|
||||||
// `\r\n
|
// `\r\n
|
||||||
if stream.peek_next().map(|ch| ch == '\n').unwrap_or(false) {
|
if let Some('\n') = stream.peek_next() {
|
||||||
eat_next(stream, pos);
|
eat_next(stream, pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1761,6 +1761,14 @@ fn get_next_token_inner(
|
|||||||
};
|
};
|
||||||
|
|
||||||
while let Some(c) = stream.get_next() {
|
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' {
|
if c == '\n' {
|
||||||
pos.new_line();
|
pos.new_line();
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user