Skip to content

Commit a73783b

Browse files
feat: syntax highlighting of code section (#6236)
Co-authored-by: AdrieanKhisbe <[email protected]>
1 parent 9e294fb commit a73783b

20 files changed

+340
-228
lines changed

docs/images/swagger-ui3.png

1.05 KB
Loading

docs/usage/configuration.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ Parameter name | Docker variable | Description
6161
<a name="tagSorter"></a>`tagsSorter` | _Unavailable_ | `Function=(a => a)`. Apply a sort to the tag list of each API. It can be 'alpha' (sort by paths alphanumerically) or a function (see [Array.prototype.sort()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) to learn how to write a sort function). Two tag name strings are passed to the sorter for each pass. Default is the order determined by Swagger UI.
6262
<a name="useUnsafeMarkdown"></a>`useUnsafeMarkdown` | `USE_UNSAFE_MARKDOWN` | `Boolean=false`. When enabled, sanitizer will leave `style`, `class` and `data-*` attributes untouched on all HTML Elements declared inside markdown strings. This parameter is **Deprecated** and will be removed in `4.0.0`.
6363
<a name="onComplete"></a>`onComplete` | _Unavailable_ | `Function=NOOP`. Provides a mechanism to be notified when Swagger UI has finished rendering a newly provided definition.
64+
<a name="syntaxHighlight"></a>`syntaxHighlight` | _Unavailable_ | Set to false to deactivate syntax highlighting of payloads and curl command, can be otherwise an object with `activate` and `theme` properties.
65+
<a name="syntaxHighlight.activate"></a>`syntaxHighlight.activate` | _Unavailable_ | `Boolean=true`. Whether the syntax highlight should be activated or not.
66+
<a name="syntaxHighlight.theme"></a>`syntaxHighlight.theme` | _Unavailable_ | `String=["agate"*, "arta", "monokai", "nord", "obsidian", "tomorrow-night]`. [Highlight.js](https://highlightjs.org/static/demo/) syntax coloring theme to use. (only these 6 styles are available).
6467

6568
##### Network
6669

package-lock.json

Lines changed: 193 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"react-inspector": "^2.3.0",
7878
"react-motion": "^0.5.2",
7979
"react-redux": "^4.x.x",
80+
"react-syntax-highlighter": "=12.2.1",
8081
"redux": "^3.x.x",
8182
"redux-immutable": "3.1.0",
8283
"remarkable": "^2.0.1",

0 commit comments

Comments
 (0)