Home / Function/ transformerCompactLineOptions() — astro Function Reference

transformerCompactLineOptions() — astro Function Reference

Architecture documentation for the transformerCompactLineOptions() function in vite.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  93f9e8cd_3823_f761_ee74_bc2fb3f0999f["transformerCompactLineOptions()"]
  35a0af3d_ab30_11cd_b3ee_bae2c089e53b["vite.ts"]
  93f9e8cd_3823_f761_ee74_bc2fb3f0999f -->|defined in| 35a0af3d_ab30_11cd_b3ee_bae2c089e53b
  db037a41_d949_746a_d19f_f8bf66222071["getViteErrorPayload()"]
  db037a41_d949_746a_d19f_f8bf66222071 -->|calls| 93f9e8cd_3823_f761_ee74_bc2fb3f0999f
  style 93f9e8cd_3823_f761_ee74_bc2fb3f0999f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/errors/dev/vite.ts lines 173–190

function transformerCompactLineOptions(
	lineOptions: {
		/**
		 * 1-based line number.
		 */
		line: number;
		classes?: string[];
	}[] = [],
): ShikiTransformer {
	return {
		name: '@shikijs/transformers:compact-line-options',
		line(node, line) {
			const lineOption = lineOptions.find((o) => o.line === line);
			if (lineOption?.classes) this.addClassToHast(node, lineOption.classes);
			return node;
		},
	};
}

Domain

Subdomains

Frequently Asked Questions

What does transformerCompactLineOptions() do?
transformerCompactLineOptions() is a function in the astro codebase, defined in packages/astro/src/core/errors/dev/vite.ts.
Where is transformerCompactLineOptions() defined?
transformerCompactLineOptions() is defined in packages/astro/src/core/errors/dev/vite.ts at line 173.
What calls transformerCompactLineOptions()?
transformerCompactLineOptions() is called by 1 function(s): getViteErrorPayload.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free