Merge pull request #1050 from liviosoares/develop_2.0
OperationView.js: fix rendering of Markdown (GFM) in description fields.
This commit is contained in:
@@ -69,9 +69,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
this.model.isReadOnly = true;
|
this.model.isReadOnly = true;
|
||||||
}
|
}
|
||||||
this.model.description = this.model.description || this.model.notes;
|
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;
|
this.model.oauth = null;
|
||||||
modelAuths = this.model.authorizations || this.model.security;
|
modelAuths = this.model.authorizations || this.model.security;
|
||||||
if (modelAuths) {
|
if (modelAuths) {
|
||||||
@@ -626,4 +623,4 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
Docs.expandOperation(elem);
|
Docs.expandOperation(elem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if description}}
|
{{#if description}}
|
||||||
<h4>Implementation Notes</h4>
|
<h4>Implementation Notes</h4>
|
||||||
<p class="markdown">{{{description}}}</p>
|
<div class="markdown">{{{description}}}</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#oauth}}
|
{{#oauth}}
|
||||||
<div class="auth">
|
<div class="auth">
|
||||||
|
|||||||
Reference in New Issue
Block a user