]> git.lizzy.rs Git - rust.git/commit
Improve comment rewriting with normalize_comments == false
authorest31 <MTest31@outlook.com>
Sat, 17 Sep 2016 01:20:00 +0000 (03:20 +0200)
committerest31 <MTest31@outlook.com>
Sat, 17 Sep 2016 01:41:11 +0000 (03:41 +0200)
commitc6243c950ee3376f562cc2dd08a3d31c9c3818b2
treeabd0b4caf34941859ee100873b3e319980256dc5
parentefd3e5c0914f0c8d401a504be4116bf947296218
Improve comment rewriting with normalize_comments == false

Only change multiline comments of the form

```rust
/*
 * Text
 */
```

while not affecting comments of the form

```rust
/*
Text
*/
```

when normalize_comments is off. In the first case,
we have a known character we can align against, while
we don't have one in the second case.

Before, we have converted the second form into the first,
but this is against the spirit of normalize_comments being
turned off.

Fixes #956
src/comment.rs
tests/source/comment4.rs
tests/target/comment4.rs