I think that indenting everything should work, we are detecting the yaml 
marker, collect all the lines in the comment until we see a thing that 
starts with swagger: or the comment block ends and then proceed to 
uncomment and remove the indentation based on the first line after the --- 
marker.

The branch I'm working in was reformatted by go 1.19 fmt and still passes 
the tests but I don't think that our test cases capture all the real-world 
use cases.

On Wednesday, August 17, 2022 at 8:33:08 PM UTC-7 crod...@gmail.com wrote:

> I think the parsing rules for go-swagger are described here:
>
> https://goswagger.io/use/spec.html#parsing-rules
>
> It looks like this issue has affected other codebases such as Cockroachdb:
>
> https://github.com/cockroachdb/cockroach/pull/86049#issuecomment-1213573808
>
> —
> Craig
>
>
> On Wednesday, August 17, 2022 at 7:20:11 PM UTC-7 Ian Lance Taylor wrote:
>
>> What are the constraints on go-swagger? Can one simply indent 
>> everything to get a code block? 
>>
>> Ian 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/04c316e1-7b37-4732-8e34-67cb8a673400n%40googlegroups.com.

Reply via email to