Skip to content

Commit c18b157

Browse files
Format the code snippets
1 parent f33b237 commit c18b157

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/spec/spec.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ The following records are used to hold the results of a match against a regular
8585
# + startIndex - The start index of the match
8686
# + endIndex - The last index of the match
8787
type PartMatch record {|
88-
string matched;
89-
int startIndex;
90-
int endIndex;
88+
string matched;
89+
int startIndex;
90+
int endIndex;
9191
|};
9292
```
9393

@@ -97,9 +97,9 @@ int endIndex;
9797
#
9898
# + groups - Information about matched regex groups
9999
public type Match record {|
100-
// The match for the whole regex
101-
*PartMatch;
102-
Groups groups;
100+
// The match for the whole regex
101+
*PartMatch;
102+
Groups groups;
103103
|};
104104
```
105105

@@ -108,11 +108,11 @@ This `Groups` object handles the matches with the group of regex.
108108
```ballerina
109109
# Holds information about matched regex groups
110110
public type Groups readonly & object {
111-
int count;
112-
// Capture groups are indexed from 1
113-
// Group 0 means whole regex
114-
// Panics if i < 0 or > count
115-
isolated function get(int i) returns PartMatch?;
111+
int count;
112+
// Capture groups are indexed from 1
113+
// Group 0 means whole regex
114+
// Panics if i < 0 or > count
115+
isolated function get(int i) returns PartMatch?;
116116
};
117117
```
118118

0 commit comments

Comments
 (0)