Skip to content

Commit

Permalink
added deprecaton messages but links in there are not resolved yet
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Oct 28, 2024
1 parent a0f7a85 commit 44915c5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/lang/rascal/tutor/apidoc/GenerateMarkdown.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ list[Output] declInfo2Doc(str parent, d:moduleInfo(), list[str] overloads, PathC
Output::empty(),
out("\<div class=\"theme-doc-version-badge badge badge--secondary\"\>rascal-<getRascalVersion()>\</div\><if (pcfg.isPackageCourse) {> \<div class=\"theme-doc-version-badge badge badge--secondary\"\><pcfg.packageName>-<pcfg.packageVersion>\</div\><}>"),
Output::empty(),
*[out(synopsis.content) | synopsis:docTag(label="synopsis") <- d.docs],
*[out(defLine) | str defLine <- split("\n", trim(d.synopsis))],
out("#### Usage"),
Output::empty(),
out("```rascal"),
Expand All @@ -122,7 +122,7 @@ list[Output] declInfo2Doc(str parent, d:functionInfo(), list[str] overloads, Pat
[
out("## function <d.name> {<moduleFragment(d.moduleName)>-<d.name>}"),
empty(),
*[out(defLine) | str defLine <- split("\n", d.synopsis)],
*[out(defLine) | str defLine <- split("\n", trim(d.synopsis))],
empty(),
out("```rascal"),
*([ *[out(defLine) | str defLine <- split("\n", ov)], empty() | ov <- overloads][..-1]),
Expand All @@ -134,7 +134,7 @@ list[Output] declInfo2Doc(str parent, d:functionInfo(), list[str] overloads, Pat
list[Output] declInfo2Doc(str parent, d:testInfo(), list[str] overloads, PathConfig pcfg, CommandExecutor exec, Index ind, list[str] dtls, bool demo) =
[
out("## test <d.name> {<moduleFragment(d.moduleName)>-<d.name>}"),
*[Output::empty(), out(synopsis.content) | synopsis:docTag(label="synopsis") <- d.docs],
*[out(defLine) | str defLine <- split("\n", trim(d.synopsis))],
Output::empty(),
out("```rascal"),
*[out(defLine) | str defLine <- split("\n", d.fullTest)],
Expand All @@ -149,7 +149,7 @@ list[Output] declInfo2Doc(str parent, d:testInfo(), list[str] overloads, PathCon
list[Output] declInfo2Doc(str parent, d:dataInfo(), list[str] overloads, PathConfig pcfg, CommandExecutor exec, Index ind, list[str] dtls, bool demo) =
[
out("## data <d.name> {<moduleFragment(d.moduleName)>-<d.name>}"),
*[out(synopsis.content) | synopsis:docTag(label="synopsis") <- d.docs],
*[out(defLine) | str defLine <- split("\n", trim(d.synopsis))],
empty(),
*[
out("```rascal"),
Expand All @@ -164,7 +164,7 @@ list[Output] declInfo2Doc(str parent, d:testInfo(), list[str] overloads, PathCon
list[Output] declInfo2Doc(str parent, d:syntaxInfo(), list[str] overloads, PathConfig pcfg, CommandExecutor exec, Index ind, list[str] dtls, bool demo) =
[
out("## syntax <d.name> {<moduleFragment(d.moduleName)>-<d.name>}"),
*[Output::empty(), out(synopsis.content) | synopsis:docTag(label="synopsis") <- d.docs],
*[out(defLine) | str defLine <- split("\n", trim(d.synopsis))],
empty(),
*[
out("```rascal"),
Expand All @@ -179,7 +179,7 @@ list[Output] declInfo2Doc(str parent, d:syntaxInfo(), list[str] overloads, PathC
list[Output] declInfo2Doc(str parent, d:aliasInfo(), list[str] overloads, PathConfig pcfg, CommandExecutor exec, Index ind, list[str] dtls, bool demo) =
[
out("## alias <d.name> {<moduleFragment(d.moduleName)>-<d.name>}"),
*[Output::empty(), out(synopsis.content) | synopsis:docTag(label="synopsis") <- d.docs],
*[out(defLine) | str defLine <- split("\n", trim(d.synopsis))],
empty(),
out("```rascal"),
*[out(removeNewlines(ov)), empty() | ov <- overloads][..-1],
Expand All @@ -203,7 +203,7 @@ list[Output] tags2Markdown(list[DocTag] tags, PathConfig pcfg, CommandExecutor e
empty()

// this assumes that the doc tags have been ordered correctly already by the extraction stage
| docTag(label=str l, src=s, content=str c) <- tags, l != "synopsis"
| docTag(label=str l, src=s, content=str c) <- tags, l != "synopsis", l != "deprecated"
];

public str basename(str cn){
Expand Down

0 comments on commit 44915c5

Please sign in to comment.