@@ -74,7 +74,7 @@ func TestRender_StandardLinks(t *testing.T) {
74
74
Links : markup.Links {
75
75
Base : FullURL ,
76
76
},
77
- IsWiki : true ,
77
+ ContentMode : markup . RenderContentAsWiki ,
78
78
}, input )
79
79
assert .NoError (t , err )
80
80
assert .Equal (t , strings .TrimSpace (expectedWiki ), strings .TrimSpace (string (buffer )))
@@ -306,9 +306,9 @@ func TestTotal_RenderWiki(t *testing.T) {
306
306
Links : markup.Links {
307
307
Base : FullURL ,
308
308
},
309
- Repo : newMockRepo (testRepoOwnerName , testRepoName ),
310
- Metas : localMetas ,
311
- IsWiki : true ,
309
+ Repo : newMockRepo (testRepoOwnerName , testRepoName ),
310
+ Metas : localMetas ,
311
+ ContentMode : markup . RenderContentAsWiki ,
312
312
}, sameCases [i ])
313
313
assert .NoError (t , err )
314
314
actual := strings .ReplaceAll (string (line ), ` data-markdown-generated-content=""` , "" )
@@ -334,7 +334,7 @@ func TestTotal_RenderWiki(t *testing.T) {
334
334
Links : markup.Links {
335
335
Base : FullURL ,
336
336
},
337
- IsWiki : true ,
337
+ ContentMode : markup . RenderContentAsWiki ,
338
338
}, testCases [i ])
339
339
assert .NoError (t , err )
340
340
actual := strings .ReplaceAll (string (line ), ` data-markdown-generated-content=""` , "" )
@@ -997,7 +997,11 @@ space</p>
997
997
}
998
998
999
999
for i , c := range cases {
1000
- result , err := markdown .RenderString (& markup.RenderContext {Ctx : context .Background (), Links : c .Links , IsWiki : c .IsWiki }, input )
1000
+ result , err := markdown .RenderString (& markup.RenderContext {
1001
+ Ctx : context .Background (),
1002
+ Links : c .Links ,
1003
+ ContentMode : util .Iif (c .IsWiki , markup .RenderContentAsWiki , markup .RenderContentAsDefault ),
1004
+ }, input )
1001
1005
assert .NoError (t , err , "Unexpected error in testcase: %v" , i )
1002
1006
actual := strings .ReplaceAll (string (result ), ` data-markdown-generated-content=""` , "" )
1003
1007
assert .Equal (t , c .Expected , actual , "Unexpected result in testcase %v" , i )
0 commit comments