Skip to content

Commit 2951e7c

Browse files
Merge pull request #12 from danini-the-panini/fix-readme
fix usage section in readme fix small formatting issue
2 parents 5db630a + b5367a5 commit 2951e7c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ This is a Dart implementation of the [KDL Document Language](https://kdl.dev)
1111
import 'package:kdl/kdl.dart';
1212
1313
main() {
14-
var document = Kdl.parseDocument(someString);
14+
var document = KdlDocument.parse(someString);
1515
}
1616
```
1717

1818
You can optionally provide your own type annotation handlers:
1919

2020
```dart
21-
KDL.parseDocument(someString, typeParsers: {
21+
KdlDocument.parse(someString, typeParsers: {
2222
'foo': (value, type) {
2323
return Foo(value.value, type: type)
2424
},

lib/src/tokenizer.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ class KdlTokenizer {
713713
if (i < 0 || i >= _str.length) {
714714
return null;
715715
}
716-
var char = _str.substring(i, i+1);
716+
var char = _str.substring(i, i + 1);
717717
if (_forbidden.contains(char)) {
718718
_fail("Forbidden character: $char");
719719
}

0 commit comments

Comments
 (0)