Open Joannis opened 3 weeks ago
When creating a snippet with the following contents, the extra indentation of the shown code is removed to make it more readable:
// snippet.hide import AsyncHTTPClient import NIOCore import Foundation @main struct Entrypoint { static func main() async throws { // snippet.show myCode() // snippet.hide } }
However, doing the same with slices does not seem to have the same effect:
import AsyncHTTPClient import NIOCore import Foundation @main struct Entrypoint { static func main() async throws { // snippet.mySlice myCode() // snippet.end } }
main
I expect the second code to render as the following in markdown:
myCode()
Indentation is kept, making code unnecessarily indented.
No response
i wasn’t able to reproduce this on version 1.3.0 of swift-docc-plugin:
what version are you on?
Description
When creating a snippet with the following contents, the extra indentation of the shown code is removed to make it more readable:
However, doing the same with slices does not seem to have the same effect:
Checklist
main
branch of this package.Expected Behavior
I expect the second code to render as the following in markdown:
Actual behavior
Indentation is kept, making code unnecessarily indented.
Steps To Reproduce
No response
Swift-DocC Version Information
No response
Swift Compiler Version Information
No response