rdx-github 0.1.0-beta.4

GitHub references transform for RDX — converts #123, @user, and commit SHAs to links
Documentation
rdx-github-0.1.0-beta.4 has been yanked.

rdx-github

Optional RDX transform that converts GitHub-style references in text to links.

Usage

use rdx_transform::Pipeline;
use rdx_github::GithubReferences;

let root = Pipeline::new()
    .add(GithubReferences::new("rdx-lang/rdx"))
    .run("Fixed in #42 by @alice (commit abc1234f).\n");

What it converts

Source Output
#123 Link to https://github.com/{repo}/issues/123
@username Link to https://github.com/username
abc1234f (7+ hex chars with a letter) Link to https://github.com/{repo}/commit/abc1234f

Configuration

The repository can be set explicitly or read from frontmatter:

// Explicit
GithubReferences::new("rdx-lang/rdx")

// From frontmatter (reads `github: owner/repo` field)
GithubReferences::from_frontmatter()

A custom base_url can be set for GitHub Enterprise:

GithubReferences::new("org/repo").base_url("https://github.example.com")

Behavior

  • Skips references inside existing links and images (no nested links)
  • Issue references require a non-alphanumeric preceding character to avoid false positives
  • User mentions must follow whitespace
  • Commit SHAs must be 7-40 hex characters and contain at least one letter

License

Licensed under either of Apache License, Version 2.0 or MIT License at your option.