mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 00:07:46 +02:00
fix strip trailing whitespace for make_docs script (#4597)
This commit is contained in:
@ -57,9 +57,12 @@ $"($example.description)
|
||||
$example_top + $examples
|
||||
} else { "" }
|
||||
|
||||
let doc = (($top + $signature + $parameters + $examples) |
|
||||
each {|it| ($it | str trim -r)} |
|
||||
str collect (char nl)) + (char nl)
|
||||
let doc = (
|
||||
($top + $signature + $parameters + $examples) |
|
||||
lines |
|
||||
each {|it| ($it | str trim -r) } |
|
||||
str collect (char nl)
|
||||
)
|
||||
|
||||
let safe_name = ($command.command | str find-replace '\?' '' | str find-replace ' ' '_')
|
||||
$doc | save --raw $"./docs/commands/($safe_name).md"
|
||||
|
Reference in New Issue
Block a user