Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis authored and astrobot-houston committed Nov 20, 2023
1 parent c6a4bcb commit 8620bb6
Show file tree
Hide file tree
Showing 6 changed files with 3,457 additions and 3,525 deletions.
6 changes: 3 additions & 3 deletions docs/src/content/docs/guides/authoring-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,15 @@ Code block rendering can be configured using Starlight’s [`expressiveCode` con
#### Text markers

You can highlight specific lines or parts of your code blocks using [Expressive Code text markers](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-text-markers/README.md#usage-in-markdown--mdx-documents) on the opening line of your code block.
Use curly braces (`{ }`) to highlight entire lines, and quotation marks to highlight strings of text.
Use curly braces (`{ }`) to highlight entire lines, and quotation marks to highlight strings of text.

There are three highlighting styles: neutral for calling attention to code, green for indicating inserted code, and red for indicating deleted code.
Both text and entire lines can be marked using the default marker, or in combination with `ins=` and `del=` to produce the desired highlighting.

Expressive Code provides several options for customizing the visual appearance of your code samples.
Expressive Code provides several options for customizing the visual appearance of your code samples.
Many of these can be combined, for highly illustrative code samples.
Please explore the [Expressive Code documentation](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-text-markers/README.md) for the extensive options available.
Some of the most common examples are shown below:
Some of the most common examples are shown below:

- [Mark entire lines & line ranges using the `{ }` marker](https://github.com/expressive-code/expressive-code/blob/main/packages/%40expressive-code/plugin-text-markers/README.md#marking-entire-lines--line-ranges):

Expand Down
12 changes: 8 additions & 4 deletions packages/starlight/integrations/expressive-code/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import type { AstroConfig, AstroIntegration } from 'astro';
import type { StarlightConfig } from '../../types';
import type { createTranslationSystemFromFs } from '../../utils/translations-fs';
import { pathToLocale } from '../shared/pathToLocale';
import { applyStarlightUiThemeColors, preprocessThemes, type ThemeObjectOrBundledThemeName } from './theming';
import {
applyStarlightUiThemeColors,
preprocessThemes,
type ThemeObjectOrBundledThemeName,
} from './theming';
import { addTranslations } from './translations';

export type StarlightExpressiveCodeOptions = Omit<AstroExpressiveCodeOptions, 'themes'> & {
Expand All @@ -26,7 +30,7 @@ export type StarlightExpressiveCodeOptions = Omit<AstroExpressiveCodeOptions, 't
*
* Defaults to `['starlight-dark', 'starlight-light']`.
*/
themes?: ThemeObjectOrBundledThemeName[] | undefined
themes?: ThemeObjectOrBundledThemeName[] | undefined;
/**
* When `true`, code blocks automatically switch between light and dark themes when the
* site theme changes.
Expand Down Expand Up @@ -85,8 +89,8 @@ export const starlightExpressiveCode = ({
if (useStarlightUiThemeColors === true && themes.length < 2) {
console.warn(
`*** Warning: Using the config option "useStarlightUiThemeColors: true" ` +
`with a single theme is not recommended. For better color contrast, ` +
`please provide at least one dark and one light theme.\n`
`with a single theme is not recommended. For better color contrast, ` +
`please provide at least one dark and one light theme.\n`
);
}

Expand Down
Loading

0 comments on commit 8620bb6

Please sign in to comment.