-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
290 additions
and
100 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
packages/astro/test/fixtures/astro-markdown-shiki/langs/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const riGrammar = JSON.parse( | ||
String.raw`{"name":"rinfo","patterns":[{"include":"#lf-rinfo"}],"repository":{"lf-rinfo":{"patterns":[{"include":"#control"},{"include":"#operator"},{"include":"#strings"},{"include":"#number"},{"include":"#comment"},{"include":"#literal"}]},"control":{"patterns":[{"name":"keyword.control.ri","match":"\\b(si|mientras|repetir)\\b"},{"name":"keyword.other.ri","match":"\\b(programa|robots|areas|variables|comenzar|fin)\\b"},{"name":"support.function.other.ri","match":"\\b(tomarFlor|HayFlorEnLaBolsa|HayFlorEnLaEsquina|depositarFlor|HayPapelEnLaBolsa|HayPapelEnLaEsquina|tomarPapel|depositarPapel)\\b"}]},"operator":{"comment":"Captures operators and also puts them in different sub-groups that further describe them","patterns":[{"match":"\\+|-|\\*|/","name":"keyword.operator.arithmetic.ri"},{"match":"<|>|<=|>=|=|<>|!=","name":"keyword.operator.comparison.ri"},{"match":"\\b(Pos|Informar|Leer|Iniciar|AsignarArea|AreaC)\\b","name":"support.function.arithmetic.ri"},{"match":":=","name":"keyword.operator.assign.ri"},{"match":"(&|~)","name":"support.function.logical.ri"}]},"strings":{"name":"string.quoted.double.ri","beginCaptures":{"0":{"name":"string.quoted.double.begin.ri"}},"endCaptures":{"0":{"name":"string.quoted.double.end.ri"}},"begin":"\"","end":"\"","patterns":[{"name":"constant.character.escape.ri","match":"\\\\."}]},"comment":{"patterns":[{"name":"comment.block.ri","begin":"{","end":"}","patterns":[{"include":"#comment"}]}]},"literal":{"patterns":[{"name":"constant.language.ri","match":"\\b(verdadero|falso|boolean|numero)\\b"}]},"number":{"patterns":[{"comment":"Captures decimal numbers, with the negative sign being considered an operator","match":"(-)?(?:((?:\\b\\d+(?:\\.\\d*)?|\\.\\d+)(?:\\b|e-?\\d+\\b)%?)|(\\$[0-9]+\\b))","captures":{"1":{"name":"keyword.operator.arithmetic.ri"},"2":{"name":"constant.numeric.decimal.ri"},"3":{"name":"constant.numeric.hex.ri"}}}]}},"scopeName":"source.rinfo"}` | ||
); | ||
|
||
export default { | ||
markdownOptions: { | ||
render: [ | ||
"@astrojs/markdown-remark", | ||
{ | ||
syntaxHighlight: 'shiki', | ||
shikiConfig: { | ||
langs: [ | ||
{ | ||
id: 'rinfo', | ||
scopeName: 'source.rinfo', | ||
grammar: riGrammar, | ||
aliases: ['ri'], | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
buildOptions: { | ||
sitemap: false, | ||
}, | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/astro-markdown-shiki/normal/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
markdownOptions: { | ||
render: ['@astrojs/markdown-remark', { syntaxHighlight: 'shiki' }], | ||
}, | ||
buildOptions: { | ||
sitemap: false, | ||
}, | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
packages/astro/test/fixtures/astro-markdown-shiki/themes-custom/astro.config.mjs
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/astro-markdown-shiki/themes-integrated/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
markdownOptions: { | ||
render: ["@astrojs/markdown-remark", { syntaxHighlight: 'shiki', shikiConfig: { theme: 'github-light' } }], | ||
}, | ||
buildOptions: { | ||
sitemap: false, | ||
}, | ||
} |
10 changes: 10 additions & 0 deletions
10
...ages/astro/test/fixtures/astro-markdown-shiki/themes-integrated/src/layouts/content.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<html> | ||
<head> | ||
<!-- Head Stuff --> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<slot></slot> | ||
</div> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
packages/astro/test/fixtures/astro-markdown-shiki/themes-integrated/src/pages/astro.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
import { Markdown } from 'astro/components'; | ||
import Layout from '../layouts/content.astro'; | ||
--- | ||
|
||
<Layout> | ||
<Markdown> | ||
# Hello world | ||
|
||
```js | ||
console.log('JavaScript') | ||
``` | ||
</Markdown> | ||
</Layout> |
24 changes: 24 additions & 0 deletions
24
...s/astro/test/fixtures/astro-markdown-shiki/themes-integrated/src/pages/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
layout: ../layouts/content.astro | ||
--- | ||
|
||
# Hello world | ||
|
||
```yaml | ||
apiVersion: v3 | ||
kind: Pod | ||
metadata: | ||
name: rss-site | ||
labels: | ||
app: web | ||
spec: | ||
containers: | ||
- name: front-end | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
- name: rss-reader | ||
image: nickchase/rss-php-nginx:v1 | ||
ports: | ||
- containerPort: 88 | ||
``` |
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/astro-markdown-shiki/wrap-false/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
markdownOptions: { | ||
render: ['@astrojs/markdown-remark', { syntaxHighlight: 'shiki', shikiConfig: { wrap: false } }], | ||
}, | ||
buildOptions: { | ||
sitemap: false, | ||
}, | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/astro/test/fixtures/astro-markdown-shiki/wrap-false/src/layouts/content.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<html> | ||
<head> | ||
<!-- Head Stuff --> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<slot></slot> | ||
</div> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
packages/astro/test/fixtures/astro-markdown-shiki/wrap-false/src/pages/astro.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
import { Markdown } from 'astro/components'; | ||
import Layout from '../layouts/content.astro'; | ||
--- | ||
|
||
<Layout> | ||
<Markdown> | ||
# Hello world | ||
|
||
``` | ||
plaintext | ||
``` | ||
|
||
```js | ||
console.log('JavaScript') | ||
``` | ||
</Markdown> | ||
</Layout> |
24 changes: 24 additions & 0 deletions
24
packages/astro/test/fixtures/astro-markdown-shiki/wrap-false/src/pages/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
layout: ../layouts/content.astro | ||
--- | ||
|
||
# Hello world | ||
|
||
```yaml | ||
apiVersion: v3 | ||
kind: Pod | ||
metadata: | ||
name: rss-site | ||
labels: | ||
app: web | ||
spec: | ||
containers: | ||
- name: front-end | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
- name: rss-reader | ||
image: nickchase/rss-php-nginx:v1 | ||
ports: | ||
- containerPort: 88 | ||
``` |
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/astro-markdown-shiki/wrap-null/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
markdownOptions: { | ||
render: ['@astrojs/markdown-remark', { syntaxHighlight: 'shiki', shikiConfig: { wrap: null } }], | ||
}, | ||
buildOptions: { | ||
sitemap: false, | ||
}, | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/astro/test/fixtures/astro-markdown-shiki/wrap-null/src/layouts/content.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<html> | ||
<head> | ||
<!-- Head Stuff --> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<slot></slot> | ||
</div> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
packages/astro/test/fixtures/astro-markdown-shiki/wrap-null/src/pages/astro.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
import { Markdown } from 'astro/components'; | ||
import Layout from '../layouts/content.astro'; | ||
--- | ||
|
||
<Layout> | ||
<Markdown> | ||
# Hello world | ||
|
||
``` | ||
plaintext | ||
``` | ||
|
||
```js | ||
console.log('JavaScript') | ||
``` | ||
</Markdown> | ||
</Layout> |
24 changes: 24 additions & 0 deletions
24
packages/astro/test/fixtures/astro-markdown-shiki/wrap-null/src/pages/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
layout: ../layouts/content.astro | ||
--- | ||
|
||
# Hello world | ||
|
||
```yaml | ||
apiVersion: v3 | ||
kind: Pod | ||
metadata: | ||
name: rss-site | ||
labels: | ||
app: web | ||
spec: | ||
containers: | ||
- name: front-end | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
- name: rss-reader | ||
image: nickchase/rss-php-nginx:v1 | ||
ports: | ||
- containerPort: 88 | ||
``` |
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/astro-markdown-shiki/wrap-true/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export default { | ||
markdownOptions: { | ||
render: ['@astrojs/markdown-remark', { syntaxHighlight: 'shiki', shikiConfig: { wrap: true } }], | ||
}, | ||
buildOptions: { | ||
sitemap: false, | ||
}, | ||
} |
10 changes: 10 additions & 0 deletions
10
packages/astro/test/fixtures/astro-markdown-shiki/wrap-true/src/layouts/content.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<html> | ||
<head> | ||
<!-- Head Stuff --> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<slot></slot> | ||
</div> | ||
</body> | ||
</html> |
18 changes: 18 additions & 0 deletions
18
packages/astro/test/fixtures/astro-markdown-shiki/wrap-true/src/pages/astro.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
import { Markdown } from 'astro/components'; | ||
import Layout from '../layouts/content.astro'; | ||
--- | ||
|
||
<Layout> | ||
<Markdown> | ||
# Hello world | ||
|
||
``` | ||
plaintext | ||
``` | ||
|
||
```js | ||
console.log('JavaScript') | ||
``` | ||
</Markdown> | ||
</Layout> |
24 changes: 24 additions & 0 deletions
24
packages/astro/test/fixtures/astro-markdown-shiki/wrap-true/src/pages/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
layout: ../layouts/content.astro | ||
--- | ||
|
||
# Hello world | ||
|
||
```yaml | ||
apiVersion: v3 | ||
kind: Pod | ||
metadata: | ||
name: rss-site | ||
labels: | ||
app: web | ||
spec: | ||
containers: | ||
- name: front-end | ||
image: nginx | ||
ports: | ||
- containerPort: 80 | ||
- name: rss-reader | ||
image: nickchase/rss-php-nginx:v1 | ||
ports: | ||
- containerPort: 88 | ||
``` |