Skip to content

Commit

Permalink
Merge pull request swagger-api#960 from mohsen1/develop_2.0
Browse files Browse the repository at this point in the history
Set marked options to render GFM correctly and fix swagger-api#700
  • Loading branch information
fehguy committed Feb 26, 2015
2 parents a6a1d8c + a56bdb9 commit 23e0c64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ gulp.task('copy', ['less'], function() {
* Watch for changes and recompile
*/
gulp.task('watch', function() {
return watch(['./src/**/*.{coffee,js,less}'], function() {
return watch(['./src/**/*.{coffee,js,less,handlebars}'], function() {
gulp.start('default');
});
});
Expand Down
7 changes: 5 additions & 2 deletions src/main/coffeescript/SwaggerUi.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ class SwaggerUi extends Backbone.Router

@options = options

# set marked options
marked.setOptions(gfm: true)

# Set the callbacks
@options.success = =>
@options.success = =>
@render()
@options.progress = (d) => @showMessage(d)
@options.failure = (d) =>
@options.failure = (d) =>
@onLoadFailure(d)

# Create view to handle the header inputs
Expand Down
3 changes: 3 additions & 0 deletions src/main/template/param_list.handlebars
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{{#if required}}
<td class='code required'>{{name}}</td>
{{/if}}
<td class='code'>{{name}}</td>
<td>
<select {{#isArray this}} multiple='multiple'{{/isArray}} class='parameter' name='{{name}}'>
Expand Down

0 comments on commit 23e0c64

Please sign in to comment.