Skip to content

Commit c7c1370

Browse files
committed
Update to spec 0.24 (#28)
1 parent 321a788 commit c7c1370

2 files changed

Lines changed: 2155 additions & 1444 deletions

File tree

commonmark-test-util/src/main/java/org/commonmark/spec/SpecReader.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,21 +82,20 @@ private List<SpecExample> read() throws IOException {
8282
}
8383

8484
private void processLine(String line) {
85-
boolean dot = line.equals(".");
8685
switch (state) {
8786
case BEFORE:
8887
Matcher matcher = SECTION_PATTERN.matcher(line);
8988
if (matcher.matches()) {
9089
section = matcher.group(1);
9190
exampleNumber = 0;
9291
}
93-
if (dot) {
92+
if (line.equals("```````````````````````````````` example")) {
9493
state = State.SOURCE;
9594
exampleNumber++;
9695
}
9796
break;
9897
case SOURCE:
99-
if (dot) {
98+
if (line.equals(".")) {
10099
state = State.HTML;
101100
} else {
102101
// examples use "rightwards arrow" to show tab
@@ -105,7 +104,7 @@ private void processLine(String line) {
105104
}
106105
break;
107106
case HTML:
108-
if (dot) {
107+
if (line.equals("````````````````````````````````")) {
109108
state = State.BEFORE;
110109
examples.add(new SpecExample(section, exampleNumber,
111110
source.toString(), html.toString()));

0 commit comments

Comments
 (0)