@@ -72,7 +72,7 @@ public static HttpRequestMatcher httpRequest(TemplateFormat format,
72
72
RequestMethod requestMethod , String uri ) {
73
73
if ("adoc" .equals (format .getFileExtension ())) {
74
74
return new HttpRequestMatcher (requestMethod , uri ,
75
- new AsciidoctorCodeBlockMatcher <>("http" ), 3 );
75
+ new AsciidoctorCodeBlockMatcher <>("http" , "nowrap" ), 3 );
76
76
}
77
77
return new HttpRequestMatcher (requestMethod , uri ,
78
78
new MarkdownCodeBlockMatcher <>("http" ), 2 );
@@ -82,15 +82,15 @@ public static HttpResponseMatcher httpResponse(TemplateFormat format,
82
82
HttpStatus status ) {
83
83
if ("adoc" .equals (format .getFileExtension ())) {
84
84
return new HttpResponseMatcher (status ,
85
- new AsciidoctorCodeBlockMatcher <>("http" ), 3 );
85
+ new AsciidoctorCodeBlockMatcher <>("http" , "nowrap" ), 3 );
86
86
}
87
87
return new HttpResponseMatcher (status , new MarkdownCodeBlockMatcher <>("http" ), 2 );
88
88
}
89
89
90
90
@ SuppressWarnings ({ "rawtypes" })
91
91
public static CodeBlockMatcher <?> codeBlock (TemplateFormat format , String language ) {
92
92
if ("adoc" .equals (format .getFileExtension ())) {
93
- return new AsciidoctorCodeBlockMatcher (language );
93
+ return new AsciidoctorCodeBlockMatcher (language , null );
94
94
}
95
95
return new MarkdownCodeBlockMatcher (language );
96
96
}
@@ -180,9 +180,10 @@ public T content(String content) {
180
180
public static class AsciidoctorCodeBlockMatcher <T extends AsciidoctorCodeBlockMatcher <T >>
181
181
extends CodeBlockMatcher <T > {
182
182
183
- protected AsciidoctorCodeBlockMatcher (String language ) {
183
+ protected AsciidoctorCodeBlockMatcher (String language , String options ) {
184
184
super (TemplateFormats .asciidoctor ());
185
- this .addLine ("[source," + language + "]" );
185
+ this .addLine ("[source," + language
186
+ + (options == null ? "" : ",options=\" " + options + "\" " ) + "]" );
186
187
this .addLine ("----" );
187
188
this .addLine ("----" );
188
189
}
0 commit comments