Merge pull request #1709 from cupgit/fix_double_curl

Only add 'curlCommand' if the 'curl' class is used on a div
This commit is contained in:
Tony Tam
2015-11-06 08:47:21 -08:00
3 changed files with 3 additions and 3 deletions

2
dist/swagger-ui.js vendored
View File

@@ -31928,7 +31928,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
//adds curl output
var curlCommand = this.model.asCurl(this.map);
curlCommand = curlCommand.replace('!', '!');
$( '.curl', $(this.el)).html('<pre>' + curlCommand + '</pre>');
$( 'div.curl', $(this.el)).html('<pre>' + curlCommand + '</pre>');
// only highlight the response if response is less than threshold, default state is highlight response
var opts = this.options.swaggerOptions;

File diff suppressed because one or more lines are too long

View File

@@ -645,7 +645,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
//adds curl output
var curlCommand = this.model.asCurl(this.map);
curlCommand = curlCommand.replace('!', '&#33;');
$( '.curl', $(this.el)).html('<pre>' + curlCommand + '</pre>');
$( 'div.curl', $(this.el)).html('<pre>' + curlCommand + '</pre>');
// only highlight the response if response is less than threshold, default state is highlight response
var opts = this.options.swaggerOptions;