Skip to content

Commit 0f69276

Browse files
line-index: Update README.md with suggestions
Co-authored-by: Laurențiu Nicola <[email protected]>
1 parent 747fa7d commit 0f69276

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/line-index/README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# line-index
22

3-
This crate is developped as part of `rust-analyzer`.
3+
This crate is developed as part of `rust-analyzer`.
44

5-
line-index is a library to convert between text offset and its corresponding line/column.
5+
line-index is a library to convert between text offsets and corresponding line/column coordinates.
66

77
## Installation
88

99
To add this crate to a project simply run `cargo add line-index`.
1010

1111
## Usage
1212

13-
The main structure is `LineIndex`. It is constructed with an utf-8 text then various utility functions can be used on it.
13+
The main structure is `LineIndex`.
14+
15+
It is constructed with an UTF-8 string, but also supports UTF-16 and UTF-32 offsets.
1416

1517
### Example
1618

@@ -25,4 +27,4 @@ line_index.offset(LineCol { line: 2, col: 3 }); // Some (24)
2527

2628
## SemVer
2729

28-
This crate follows [semver principles]([url](https://semver.org/)https://semver.org/).
30+
This crate uses [semver](https://semver.org/) versioning.

0 commit comments

Comments
 (0)