PackageVersionShortcode
Pennington.Markdown.Shortcodes
Built-in shortcode that emits Pennington's published package version, dispatched by the name PackageVersion. Resolves the Pennington core assembly's AssemblyInformationalVersionAttribute and trims MinVer's +<sha> build metadata, so it matches the NuGet version a reader installs. Unlike the Version shortcode (which reads the host's entry assembly), this always reports Pennington itself — the value to stamp into install snippets. Takes no arguments.
Properties
Namestring- Case-insensitive name used to dispatch
<?# Name ... ?>invocations.
Methods
ExecuteAsync
#public Task<string> ExecuteAsync(ShortcodeInvocation invocation, ShortcodeContext context, CancellationToken cancellationToken)
Produces the replacement text for one invocation. invocation carries the parsed arguments and inline content (null for self-closing tags); context carries the host page's route and metadata.
Parameters
invocationShortcodeInvocationcontextShortcodeContextcancellationTokenCancellationToken
Returns
Task<string>Pennington.Markdown.Shortcodes.PackageVersionShortcode
namespace Pennington.Markdown.Shortcodes;
/// Built-in shortcode that emits Pennington's published package version, dispatched by the name PackageVersion. Resolves the Pennington core assembly's AssemblyInformationalVersionAttribute and trims MinVer's +<sha> build metadata, so it matches the NuGet version a reader installs. Unlike the Version shortcode (which reads the host's entry assembly), this always reports Pennington itself — the value to stamp into install snippets. Takes no arguments.
public class PackageVersionShortcode
{
/// Produces the replacement text for one invocation. invocation carries the parsed arguments and inline content (null for self-closing tags); context carries the host page's route and metadata.
public Task<string> ExecuteAsync(ShortcodeInvocation invocation, ShortcodeContext context, CancellationToken cancellationToken)
;
/// Case-insensitive name used to dispatch <?# Name ... ?> invocations.
public string Name { get; }
}