OperatioView.js: fix rendering of Markdown (GFM) in description fields.
This removes substitution of \r\n, \r, \n to <br>, since the subsequent set of renderGFM() gets confused by them. Furthermore, the marked module already does a decent job of substituting \n with proper HTML (<p>, if I'm not mistaken).
This commit is contained in:
@@ -69,9 +69,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
this.model.isReadOnly = true;
|
||||
}
|
||||
this.model.description = this.model.description || this.model.notes;
|
||||
if (this.model.description) {
|
||||
this.model.description = this.model.description.replace(/(?:\r\n|\r|\n)/g, '<br />');
|
||||
}
|
||||
this.model.oauth = null;
|
||||
modelAuths = this.model.authorizations || this.model.security;
|
||||
if (modelAuths) {
|
||||
@@ -626,4 +623,4 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
Docs.expandOperation(elem);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user