This commit is contained in:
Tony Tam
2015-06-03 22:12:51 -07:00
8 changed files with 66 additions and 1 deletions

View File

@@ -426,6 +426,17 @@
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
font-weight: bold;
}
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
display: inline;
}
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
display: block;
content: '';
}
.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
margin-right: -3px;
}
.swagger-section .swagger-ui-wrap .model-signature .propName {
font-weight: bold;
}

View File

@@ -426,6 +426,17 @@
.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
font-weight: bold;
}
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {
display: inline;
}
.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {
display: block;
content: '';
}
.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {
margin-right: -3px;
}
.swagger-section .swagger-ui-wrap .model-signature .propName {
font-weight: bold;
}

View File

@@ -200,6 +200,10 @@ window.SwaggerUi = Backbone.Router.extend({
$('.markdown').each(function(){
$(this).html(marked($(this).html()));
});
$('.propDesc', '.model-signature .description').each(function () {
$(this).html(marked($(this).html())).addClass('markdown');
});
}
});

View File

@@ -321,6 +321,19 @@
}
}
}
.propDesc.markdown {
> p:first-child,
> p:last-child {
display: inline;
}
> p:not(:first-child):before {
display: block;
content: '';
}
}
span:last-of-type.propDesc.markdown > p:only-child {
margin-right: -3px; // otherwise there is a gap before the comma
}
}
.propName {
font-weight: bold;