File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
src/core/components/providers Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ function Markdown({ source, className = "" }) {
3535 linkTarget : "_blank"
3636 } )
3737
38+ md . core . ruler . disable ( [ "replacements" , "smartquotes" ] )
39+
3840 const html = md . render ( source )
3941 const sanitized = sanitizer ( html )
4042
Original file line number Diff line number Diff line change 1+ ---
2+ swagger : ' 2.0'
3+ info :
4+ title : Foobar Service
5+ description : ' <br><p>Example of a simple GET request via curl with bearer HTTP Authentication:</p><pre>curl
6+ -X GET "https://foobar.com/stuff" -H "Accept: application/json" -H "Authorization:
7+ Bearer abc123.xyz.789"</pre>'
8+ version : ' 2.0'
9+ paths : {}
10+
Original file line number Diff line number Diff line change 1+ describe ( "#5060: unwanted smart quotes in rendered Markdown" , ( ) => {
2+ it ( "should not convert regular quotes to smart quotes" , ( ) => {
3+ cy
4+ . visit ( "/?url=/documents/bugs/5060.yaml" )
5+ . get ( "div.description" )
6+ . should ( $el => {
7+ const text = $el . get ( 0 ) . textContent
8+ expect ( text ) . to . include ( `Example of a simple GET request via curl with bearer HTTP Authentication` )
9+ expect ( text ) . to . include ( `curl -X GET "https://foobar.com/stuff"` )
10+ expect ( text ) . to . include ( `-H "Accept: application/json"` )
11+ expect ( text ) . to . include ( `-H "Authorization: Bearer abc123.xyz.789"` )
12+ expect ( text . indexOf ( `“` ) ) . to . equal ( - 1 )
13+ } )
14+ } )
15+ } )
You can’t perform that action at this time.
0 commit comments