Skip to content

Commit

Permalink
added clear deprecated message to every @deprecated definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed May 10, 2024
1 parent 37ad8ed commit 5605bcd
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/lang/rascal/tutor/apidoc/ExtractInfo.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,27 @@ str getSynopsis(rel[str, DocTag] tags) {
}
if (docTag(content=str docContents) <- tags["synopsis"]) {
return trim(intercalate(" ", split("\n", docContents)));
if (docTag(content=str deprMessage) <- tags["deprecated"]) {
return "<trim(intercalate(" ", split("\n", docContents)))>
'
':::warning
'**deprecated: marked for future deletion**
'<deprMessage>
':::
'";
}
else {
return trim(intercalate(" ", split("\n", docContents)));
}
}
else {
return "";
}
}
bool isTutorTag(str label) = label in {"doc", "synopsis", "syntax", "types", "details", "description", "examples", "benefits", "pitfalls"};
bool isTutorTag(str label) = label in {"doc", "synopsis", "syntax", "types", "details", "description", "examples", "benefits", "pitfalls", "deprecated"};
@synopsis{extracts the contents of _all_ tags from a declaration syntax tree and stores origin information}
rel[str, DocTag] getTagContents(Tags tags){
Expand Down

0 comments on commit 5605bcd

Please sign in to comment.