Skip to content

Commit 663a94b

Browse files
committed
docs: update README [ci skip]
1 parent 7a75a20 commit 663a94b

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ export default {
4141
};
4242
```
4343

44-
Refer to [examples/sveltekit](examples/sveltekit) for an example set-up.
44+
Refer to [examples/sveltekit](examples/sveltekit) or [examples/vite](examples/vite).
4545

4646
## Usage
4747

48-
There are two ways to apply `highlight.js` styles:
48+
There are two ways to apply `highlight.js` styles.
4949

50-
1. JavaScript styles injected into the DOM through `svelte:head`
51-
2. CSS StyleSheets imported using a file loader
50+
1. Injected styles through [svelte:head](https://svelte.dev/docs#template-syntax-svelte-head)
51+
2. CSS StyleSheets
5252

5353
### Injected Styles
5454

@@ -107,9 +107,9 @@ Use the `HighlightSvelte` component for Svelte syntax highlighting.
107107

108108
## Auto-highlighting
109109

110-
The `HighlightAuto` component invokes the `highlightAuto` API from `highlight.js`.
110+
The `HighlightAuto` component uses [highlightAuto](https://highlightjs.readthedocs.io/en/latest/api.html#highlightauto) API.
111111

112-
Note that auto-highlighting will result in a larger bundle size in order to infer a language.
112+
**Note:** auto-highlighting will result in a larger bundle size in order to infer a language.
113113

114114
Prefer to specify a language if possible.
115115

@@ -132,8 +132,6 @@ Prefer to specify a language if possible.
132132

133133
All `Highlight` components apply a `data-language` attribute on the codeblock containing the language name.
134134

135-
This is also compatible with custom languages.
136-
137135
See the [Languages page](SUPPORTED_LANGUAGES.md) for a list of supported languages.
138136

139137
```css
@@ -146,11 +144,9 @@ See the [Languages page](SUPPORTED_LANGUAGES.md) for a list of supported languag
146144

147145
All `Highlight` components allow for a tag to be added at the top-right of the codeblock displaying the language name.
148146

149-
The language tag can be given a custom `background` , `color` , and `border-radius` through the custom properties shown.
150-
151-
This is also compatible with custom languages.
147+
The language tag can be given a custom `background` , `color` , and `border-radius` through CSS custom properties.
152148

153-
It is recommended that you set values for `--hljs-background` and `--hljs-foreground` to ensure the langtags remain readable on any theme.
149+
It is recommended that you set values for `--hljs-background` and `--hljs-foreground` to ensure the langtags are readable with your theme.
154150

155151
See the [Languages page](SUPPORTED_LANGUAGES.md) for a list of supported languages.
156152

@@ -194,6 +190,7 @@ Refer to the highlight.js [language definition guide](https://highlightjs.readth
194190
register: (hljs) => {
195191
return {
196192
/** custom language rules */
193+
contains: [],
197194
};
198195
},
199196
};

0 commit comments

Comments
 (0)