Skip to content

Commit

Permalink
[stardoc] Update stardoc to 7.0.0
Browse files Browse the repository at this point in the history
Of special note:
> The Markdown renderer now uses Google EscapeVelocity instead of Apache Velocity for templating. The templating engines are almost compatible, with the exception of escapes in string literals: if in your template you had a string literal with a character escape, you would need to expand it.

[Release Notes for 0.6.0](https://github.com/bazelbuild/stardoc/releases/tag/0.6.0)

"almost", indeed. :/

fixes #1203
  • Loading branch information
restingbull committed Sep 6, 2024
1 parent e39c952 commit 718a0b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ maven.install(
use_repo(maven, "kotlin_rules_maven", "unpinned_kotlin_rules_maven")

bazel_dep(name = "rules_pkg", version = "0.7.0")
bazel_dep(name = "stardoc", version = "0.5.6", repo_name = "io_bazel_stardoc")
bazel_dep(name = "stardoc", version = "0.7.0", repo_name = "io_bazel_stardoc")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")

bazel_dep(name = "rules_testing", version = "0.5.0", dev_dependency = True)
10 changes: 8 additions & 2 deletions kotlin/doc-templates/rule.vm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ ${util.ruleSummary($ruleName, $ruleInfo)}

## find common nonzero indent
#set($chomp=0)
#foreach ($ln in $ruleInfo.docString.split("\n"))
## > Stardoc 6.0.0 The Markdown renderer now uses Google EscapeVelocity instead of Apache Velocity for templating.
## No more \n in templating rules. :/
#foreach ($ln in $ruleInfo.docString.split("
"))
#if ($ln.length() > 0)
#foreach ($c in [0..$ln.length()])
#if (!$ln.substring(0, $c).trim().isEmpty())
Expand All @@ -22,7 +25,10 @@ ${util.ruleSummary($ruleName, $ruleInfo)}
#end

## print lines, removing common indent.
#foreach ($ln in $ruleInfo.docString.split("\n"))
## > Stardoc 6.0.0 The Markdown renderer now uses Google EscapeVelocity instead of Apache Velocity for templating.
## No more \n in templating rules. :/
#foreach ($ln in $ruleInfo.docString.split("
"))
#if ($ln.length() >= $chomp && $ln.substring(0, $chomp).trim().isEmpty())
${ln.substring($chomp)}
#else
Expand Down

0 comments on commit 718a0b9

Please sign in to comment.