Method
setContent(_:content:markers:)
Stores protected area content manually.
func setContent(_ id: String, content: String, markers: (String, String)? = nil)
Parameters
id-
The protected area identifier
content-
The content to preserve
markers-
Optional tuple of (startMarker, endMarker)
Discussion
This is useful for programmatically adding protected areas without scanning files.
Example
await manager.setContent(
"custom-section",
content: "My custom code",
markers: ("// START PROTECTED REGION custom-section",
"// END PROTECTED REGION custom-section")
)