=sbt Fix StreamOperatorsIndexGenerator on Windows (#31347)
This commit is contained in:
parent
bfafb8cf0f
commit
dc480ac9da
2 changed files with 12 additions and 5 deletions
|
|
@ -514,6 +514,7 @@ For more background see the @ref[Error Handling in Streams](../stream-error.md)
|
||||||
* [orElse](Source-or-Flow/orElse.md)
|
* [orElse](Source-or-Flow/orElse.md)
|
||||||
* [Partition](Partition.md)
|
* [Partition](Partition.md)
|
||||||
* [prefixAndTail](Source-or-Flow/prefixAndTail.md)
|
* [prefixAndTail](Source-or-Flow/prefixAndTail.md)
|
||||||
|
* [preMaterialize](Source-or-Flow/preMaterialize.md)
|
||||||
* [preMaterialize](Sink/preMaterialize.md)
|
* [preMaterialize](Sink/preMaterialize.md)
|
||||||
* [prepend](Source-or-Flow/prepend.md)
|
* [prepend](Source-or-Flow/prepend.md)
|
||||||
* [prependLazy](Source-or-Flow/prependLazy.md)
|
* [prependLazy](Source-or-Flow/prependLazy.md)
|
||||||
|
|
|
||||||
|
|
@ -248,9 +248,15 @@ object StreamOperatorsIndexGenerator extends AutoPlugin {
|
||||||
s"There must be at least 5 lines in $file, including the title, description, category link and an empty line between each two of them")
|
s"There must be at least 5 lines in $file, including the title, description, category link and an empty line between each two of them")
|
||||||
// This forces the short description to be on a single line. We could make this smarter,
|
// This forces the short description to be on a single line. We could make this smarter,
|
||||||
// but 'forcing' the short description to be really short seems nice as well.
|
// but 'forcing' the short description to be really short seems nice as well.
|
||||||
val description = lines(2)
|
val separator = java.io.File.separatorChar
|
||||||
.replaceAll("ref:?\\[(.*?)\\]\\(", "ref[$1](" + file.getAbsolutePath.replaceFirst(".*/([^/]+/).*", "$1"))
|
val path =
|
||||||
require(!description.isEmpty, s"description in $file must be non-empty, single-line description at the 3rd line")
|
if (separator != '/')
|
||||||
|
file.getAbsolutePath.replace(separator, '/')
|
||||||
|
else
|
||||||
|
file.getAbsolutePath
|
||||||
|
val description =
|
||||||
|
lines(2).replaceAll("ref:?\\[(.*?)\\]\\(", "ref[$1](" + path.replaceFirst(".*/([^/]+/).*", "$1"))
|
||||||
|
require(description.nonEmpty, s"description in $file must be non-empty, single-line description at the 3rd line")
|
||||||
val categoryLink = lines(4)
|
val categoryLink = lines(4)
|
||||||
require(
|
require(
|
||||||
categoryLink.startsWith("@ref"),
|
categoryLink.startsWith("@ref"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue