Tags: devlooped/readme
Tags
Rename package tokens and expose CollectReplacementTokens + ReplacePa… …ckageTokens Make $token$ replacement a first-class extensibility surface rather than a readme-only side effect of ProcessPackageReadmeIncludes. - Rename @(ReadmeReplacementToken) to @(PackageReplacementToken) (same name as NuGetizer; last value wins so both packages can coexist without failing) - Extract default token population into CollectReplacementTokens so consumers can inject, remove, or override values AfterTargets that collect - Rename ProcessPackageReadmeIncludes / ProcessReadmeIncludes to ProcessPackageReadme (includes + tokens + GitHub URL expansion) - Add ReplacePackageTokens task for arbitrary InputFile/OutputFile processing with incremental Inputs/Outputs; warn RDM001 on unknown placeholders (NoWarn-suppressible). Readme processing intentionally does not warn. - Document token extensibility and EULA-style file replacement in readme.md
Bump the tests group with 1 update Bumps Microsoft.NET.Test.Sdk from 18.7.0 to 18.8.1 --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.8.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: tests ... Signed-off-by: dependabot[bot] <support@github.com>
Use Markdig for exclude fences and fix fragment double-includes Parse exclude fenced code blocks via Markdig FencedCodeBlock instead of a hand-rolled scanner. Resolve #fragment anchors only as full-line HtmlBlocks so inline docs mentions of the content anchor no longer truncate the slice, and stop already-expanded include spans from eating a second open of the same path. Regression tests cover the package-readme OSMF duplication.
feat: expand GitHub relative URLs in package readme at pack time Port NuGetizer's pack-time rewriting of relative Markdown links and images so packaged readmes resolve correctly on nuget.org (and other consumers that do not share the repo working tree). Why this is needed ------------------ Package readmes often use relative paths like [license](license.txt) or . Those work in the GitHub repo UI but break when the readme is shown on nuget.org, which has no repo file tree. Expanding them to raw.githubusercontent.com URLs pinned to the packed commit keeps badges, images, and doc links working for package consumers without authors having to hard-code absolute URLs (or re-edit the readme for every release). What changed ------------ - GitHubUrlExpander: Markdig LinkInline walk + NormalizeRenderer (same algorithm as NuGetizer CreatePackage). Expands relative links and nested images inside clickable badges; leaves absolute URLs untouched; strips a trailing .git from RepositoryUrl. - ProcessReadmeIncludes pipeline: includes -> $token$ replacement -> GitHub URL expansion, writing the intermediate file under BaseIntermediateOutputPath. - Opt-out: ReadmeExpandGitHubUrls=false (default true). - Auto-skip when RepositoryUrl/commit is missing or host is not github.com (no warnings). Commit resolved as RepositoryCommit -> RepositorySha -> SourceRevisionId; URL from RepositoryUrl or SourceLink PrivateRepositoryUrl when PublishRepositoryUrl=true. - ILRepack Markdig (+ polyfills) into build/Readme.dll so the development dependency ships a single task assembly. Uses catbag ILRepack.targets via dotnet-file; project target supplies MSBuild ref dirs for resolve-only /lib. - Docs (AGENTS.md, readme.md) and unit/integration tests covering expansion, opt-out, skip paths, and internalized Markdig.