Repository navigation
Teach Sharpie Discord's Markdown and catch softcode left outside code - #11
Merged
Merged
Conversation
Softcode's backticks, asterisks and underscores are Discord formatting, so an attribute tree written as plain text came out as broken inline code. The prompt now has a Discord formatting section, its own examples use double backticks, and WritingCheck sends back a reply with a stray backtick or a tree like DATA`42`TO outside code for one rewrite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 5 billable files and costs up to $1.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 29 minutes for your next included review. View limit details
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Grave · project thread
Why
Discord renders a message as Markdown, and softcode's characters are Markdown syntax: backticks in attribute trees,
*and_in wildcards and names,~and|. Written as plain text,DATA`42`TOrenders as "DATA", then "42" in inline code, then "TO". The prompt's only guidance was "code in ``` blocks", and its own examples wroteCMD`SETRANKbare, so Sharpie copied them.What changes
# Discord formattingsection in the rules:``CMD`SETRANK``.WritingCheck: it now also flags two things, which get the existing one-shot rewrite:DATA`42`TO. That's an attribute tree written as plain text.Sources for the rules
/^(`+)([\s\S]*?[^`])\1(?!`)/, so a span closes on a backtick run as long as the one that opened it.\escapes any punctuation character:/^\\([^0-9A-Za-z\s])/.Testing
WritingCheckTestsgroups, covering both ways softcode ends up outside code and the coded forms that must pass. They failed to build beforeBacktickOutsideCodeexisted.PromptTestscheck that the Discord formatting section is present and the bare example is gone.dotnet format --verify-no-changesis clean.🤖 Generated with Claude Code