File tree 4 files changed +27
-3
lines changed
4 files changed +27
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " astro-remote " : patch
3
+ ---
4
+
5
+ Fixes an issue with internal ` getIndent ` function used for spacing corrections for ` Markdown `
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ export function createComponentProxy(
39
39
}
40
40
41
41
function getIndent ( ln : string ) : string {
42
- if ( ln . trim ( ) === ln ) return "" ;
43
- return ln . slice ( 0 , ln . length - ln . trim ( ) . length ) ;
42
+ if ( ln . trimStart ( ) === ln ) return "" ;
43
+ return ln . slice ( 0 , ln . length - ln . trimStart ( ) . length ) ;
44
44
}
45
45
46
46
export function dedent ( str : string ) : string {
Original file line number Diff line number Diff line change 14
14
<ul >
15
15
<li ><a href =" /test-md-local" >Test Local Markdown "< Markdown >"</a ></li >
16
16
<li ><a href =" /test-issue7" >Test Issue #7</a ></li >
17
+ <li ><a href =" /test-issue27" >Test Issue #27</a ></li >
17
18
</ul >
18
19
<h2 >Remote:</h2 >
19
20
<ul >
20
21
<li ><a href =" /test-html" >Test Remote HTML "< Markup >"</a ></li >
21
22
<li ><a href =" /test-md-remote" >Test Remote Markdown "< Markdown >"</a ></li >
22
23
</ul >
23
24
</body >
24
- </html >
25
+ </html >
Original file line number Diff line number Diff line change
1
+ ---
2
+ import { Markdown } from " astro-remote" ;
3
+ ---
4
+
5
+ <html lang =" en" >
6
+ <head >
7
+ <meta charset =" utf-8" />
8
+ <link rel =" icon" type =" image/svg+xml" href =" /favicon.svg" />
9
+ <meta name =" viewport" content =" width=device-width" />
10
+ <meta name =" generator" content ={ Astro .generator } />
11
+ <title >Astro</title >
12
+ </head >
13
+ <body >
14
+ <Markdown content ={ " <mark>Highlighted word</mark> with no trailing space" } />
15
+ <Markdown content ={ " <mark>Highlighted word</mark> with trailing space " } />
16
+ <Markdown content ={ " Non-initial <mark>Highlighted word</mark> with trailing spaces " } />
17
+ </body >
18
+ </html >
You can’t perform that action at this time.
0 commit comments