Skip to content

Commit

Permalink
Reverse changes in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
uppal101 committed Dec 4, 2017
1 parent 5c5723e commit f1653c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions example/src/Demo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class Demo extends React.Component {
this.setState({ docs: createDocs(oas, 'api-setting') });
}
render() {
console.log(this.state.docs);
return (
<div>
<div className="api-list-header">
Expand All @@ -66,7 +65,7 @@ class Demo extends React.Component {
oasFiles={{
'api-setting': Object.assign(extensions.defaults, this.state.oas),
}}
flags={{ correctnewlines: true }}
flags={{ correctnewlines: false }}
oauthUrl={this.props.oauthUrl}
/>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const extensions = require('../../../readme-oas-extensions');
const generateCodeSnippet = require('../../src/lib/generate-code-snippet');

const { getLangName } = generateCodeSnippet;

const oas = {
Expand Down
3 changes: 2 additions & 1 deletion packages/api-explorer-ui/src/lib/generate-code-snippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ module.exports = (oas, operation, values, lang) => {
return syntaxHighlighter(snippet.convert(...language.httpsnippet), language.highlight);
};

module.exports.getLangName = lang => supportedLanguages[lang] ? supportedLanguages[lang].name : lang;
module.exports.getLangName = lang =>
supportedLanguages[lang] ? supportedLanguages[lang].name : lang;

0 comments on commit f1653c9

Please sign in to comment.