Skip to content

Code block font renders -> as → ligature Problem #589

@julioest

Description

@julioest

Problem

In code blocks, the arrow operator -> is being replaced by a single character. This is a font ligature that shouldn't apply to code blocks in documentation, as it misrepresents the actual C++ syntax.

Example

See: https://develop.capy.cpp.al/capy/reference/boost/capy/strand-05.html

The member access arrow -> displays as instead of the literal two-character sequence.

Expected behavior

Code blocks should display -> as two distinct characters (- and >), not as a ligature.

Likely cause

The code block font has ligatures enabled. Fix options:

  1. Add font-feature-settings: "liga" 0, "calt" 0; to code block CSS
  2. Use a font variant without ligatures
  3. Set font-variant-ligatures: none; on code elements

Reported by

Gennaro Prota

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions