This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

WordBreakExtensions Pennington.Infrastructure

Opt-in registration for word-break typography.

Methods

AddWordBreak

#
public static IServiceCollection AddWordBreak(IServiceCollection services, Action<WordBreakOptions> configure = null)

Registers WordBreakHtmlRewriter in the shared HTML rewriting pipeline, so long identifiers in the configured elements get <wbr> break opportunities without an extra DOM parse.

Parameters

services IServiceCollection
The service collection.
configure Action<WordBreakOptions>
Optional configuration of the selector and break behavior.

Returns

IServiceCollection
The service collection, for chaining.

Pennington.Infrastructure.WordBreakExtensions

namespace Pennington.Infrastructure;

/// Opt-in registration for word-break typography.
public class WordBreakExtensions
{
    /// Registers WordBreakHtmlRewriter in the shared HTML rewriting pipeline, so long identifiers in the configured elements get <wbr> break opportunities without an extra DOM parse.
    
public static IServiceCollection AddWordBreak(IServiceCollection services, Action<WordBreakOptions> configure = null)
; }