Skip to content

Commit

Permalink
Revert "Rename tag.name to tag.text"
Browse files Browse the repository at this point in the history
This reverts commit 79f22f7.
  • Loading branch information
greg-at-moderne committed Jan 31, 2025
1 parent 54068ba commit 432817d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public Yaml visitTag(Yaml.Tag tag, PrintOutputCapture<P> p) {
visitMarkers(tag.getMarkers(), p);
p
.append(tag.getPrefix())
.append(tag.getText())
.append(tag.getName())
.append(tag.getSuffix());
afterSyntax(tag, p);
return tag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ class Tag implements Yaml {
Markers markers;

@With
String text;
String name;

@Override
public <P> Yaml acceptYaml(YamlVisitor<P> v, P p) {
Expand All @@ -542,12 +542,12 @@ public <P> Yaml acceptYaml(YamlVisitor<P> v, P p) {

@Override
public Tag copyPaste() {
return new Tag(randomId(), prefix, suffix, Markers.EMPTY, text);
return new Tag(randomId(), prefix, suffix, Markers.EMPTY, name);
}

@Override
public String toString() {
return "Yaml.Tag(" + text + ")";
return "Yaml.Tag(" + name + ")";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,6 @@ void parseTagInMapping() {
Yaml.Mapping.Entry person = topMapping.getEntries().get(0);
assertEquals("person", person.getKey().getValue());
Yaml.Mapping withinPerson = (Yaml.Mapping) person.getValue();
assertEquals("!!map", withinPerson.getTag().getText());
assertEquals("!!map", withinPerson.getTag().getName());
}
}

0 comments on commit 432817d

Please sign in to comment.