Ver a proveniência

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).
bubble
Livio Soares há 9 anos
ascendente
cometimento
b181fa95a0
1 ficheiros alterados com 1 adições e 4 eliminações
  1. +1
    -4
      src/main/javascript/view/OperationView.js

+ 1
- 4
src/main/javascript/view/OperationView.js Ver ficheiro

@@ -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);
}
}
});
});

Carregando…
Cancelar
Guardar