Home / Function/ escapeUnderscore() — tailwindcss Function Reference

escapeUnderscore() — tailwindcss Function Reference

Architecture documentation for the escapeUnderscore() function in candidate.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  3c88f31d_8ac6_8ee3_8146_bfeefdb73288["escapeUnderscore()"]
  669e6a28_c71f_3c5e_9c53_915cede7da78["candidate.ts"]
  3c88f31d_8ac6_8ee3_8146_bfeefdb73288 -->|defined in| 669e6a28_c71f_3c5e_9c53_915cede7da78
  90af3061_98c6_bbc0_b56e_ef2a73fdc21a["recursivelyEscapeUnderscores()"]
  90af3061_98c6_bbc0_b56e_ef2a73fdc21a -->|calls| 3c88f31d_8ac6_8ee3_8146_bfeefdb73288
  style 3c88f31d_8ac6_8ee3_8146_bfeefdb73288 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/candidate.ts lines 1174–1178

function escapeUnderscore(value: string): string {
  return value
    .replaceAll('_', String.raw`\_`) // Escape underscores to keep them as-is
    .replaceAll(' ', '_') // Replace spaces with underscores
}

Domain

Subdomains

Frequently Asked Questions

What does escapeUnderscore() do?
escapeUnderscore() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/candidate.ts.
Where is escapeUnderscore() defined?
escapeUnderscore() is defined in packages/tailwindcss/src/candidate.ts at line 1174.
What calls escapeUnderscore()?
escapeUnderscore() is called by 1 function(s): recursivelyEscapeUnderscores.

Analyze Your Own Codebase

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

Try Supermodel Free