fix: code highlight styles are now only applied pre.microlight (#5673)
* patch(#5672): code highlight styles are now only applied to pre blocks that have the class pre.microlight * fixed pre style appied to .request-url * fixed response-headers and request-duration pre blocks * made pre.microlight class as per review * added microlight class to appropriate pre and added tests
This commit is contained in:
committed by
kyle shockey
parent
7e5974c14f
commit
e8266a3c6d
@@ -87,7 +87,7 @@ export default class ResponseBody extends React.PureComponent {
|
||||
bodyEl = <div><a href={ href } download={ download }>{ "Download file" }</a></div>
|
||||
}
|
||||
} else {
|
||||
bodyEl = <pre>Download headers detected but your browser does not support downloading binary via XHR (Blob).</pre>
|
||||
bodyEl = <pre className="microlight">Download headers detected but your browser does not support downloading binary via XHR (Blob).</pre>
|
||||
}
|
||||
|
||||
// Anything else (CORS)
|
||||
@@ -123,7 +123,7 @@ export default class ResponseBody extends React.PureComponent {
|
||||
|
||||
// Audio
|
||||
} else if (/^audio\//i.test(contentType)) {
|
||||
bodyEl = <pre><audio controls><source src={ url } type={ contentType } /></audio></pre>
|
||||
bodyEl = <pre className="microlight"><audio controls><source src={ url } type={ contentType } /></audio></pre>
|
||||
} else if (typeof content === "string") {
|
||||
bodyEl = <HighlightCode downloadable fileName={`${downloadName}.txt`} value={ content } />
|
||||
} else if ( content.size > 0 ) {
|
||||
|
||||
Reference in New Issue
Block a user