Skip to main content

Core Features

Mappings

A mapping is a rule that connects a URL pattern (and optionally a specific element) to a piece of content. Mappings are what let Promptr know which notes to show for the page you’re on.

Where mappings live

Mappings come from two places, and both are matched at once:

  • Local mappings — created on your machine via Learning Mode or the Manage Mappings window, stored in a local database.
  • Shared-folder rules — carried inside your content files (frontmatter or sidecars) so they travel with the content to your whole team. See Shared Folders.

URL pattern matching

Before comparing, Promptr normalizes both the pattern and your current URL so small differences don’t break a match. It ignores the ?query string and #fragment, lowercases the scheme and host, drops the default port, and ignores a single trailing slash.

Patterns support a * wildcard that matches any run of characters. The two most useful shapes are a trailing /* to match everything beneath a path, and a leading *. in the host to match subdomains. A pattern with no wildcard must match exactly (after normalization).

Pattern:  https://dashboard.stripe.com/billing/*
matches   https://dashboard.stripe.com/billing/invoices
matches   https://dashboard.stripe.com/billing/settings?tab=1   (query ignored)
no match  https://dashboard.stripe.com/customers

Pattern:  https://help.example.com
matches   https://help.example.com/                             (trailing slash ignored)
matches   https://HELP.EXAMPLE.COM                              (host case-insensitive)
no match  https://help.example.com/pricing

Anchor matching

A mapping can also target a specific element by anchor. The anchor is a short piece of text that Promptr compares (case-insensitively) against the element’s text, CSS selector, or aria-label as a substring — or against its test id as an exact match. Leave the anchor off to map the whole page.

How the best match is chosen

Promptr shows exactly one snippet — the single best match, chosen in this order:

  1. Your local mappings win first. If any local rule matches, it’s used and shared folders aren’t consulted.
  2. Then shared folders, by priority. Lower priority number = higher precedence.
  3. Within a source, an anchor-specific match beats a page-level match.

One match at a time

Only the top match is displayed — matches are never stacked or merged. If two rules could match the same view, use priority (for folders) or a more specific anchor to control which one wins.