Making WordPress.org

Opened 4 days ago

Last modified 4 days ago

#8408 new enhancement

Prevent creating tickets and submitting comments in Trac that are formatted in Markdown

Reported by: westonruter Owned by:
Priority: normal Milestone:
Component: Trac Keywords: needs-patch
Cc:

Description

Very often I'm seeing Tickets created with descriptions which are formatted in Markdown. Very often these are generated by agents and people appear to just be pasting in the text without regard to how it previews. They may not be aware that WikiFormatting is different from Markdown. This also goes for comments added to Trac tickets.

I suggest that Trac be modified to detect when text is entered in Markdown (e.g. looking for common Markdown formatting) and then disable the "Create Ticket" or "Submit Changes" button with a notice to instruct the user to reformat their Markdown in WikiFormatting. AI agents can do this reformatting easily. Ideally contributors would instruct their agents to generate the text in WikiFormatting up-front. So the notice could say something like:

Your text was detected to be in Markdown, but Trac uses WikiFormatting. Please reformat your text. If using AI to generate the text, instruct it to use WikiFormatting for generating text for Trac in the future. Please also do not use hard returns when formatting paragraphs. Use soft returns to let the browser wrap the paragraphs automatically.

As an alternative to this, we could automatically convert Markdown to WikiFormatting upon submission (using the same mechanism as rendering GitHub text in Trac), but this seems risky as the conversion could corrupt something and the current conversion logic has gaps.

Change History (1)

This ticket was mentioned in Slack in #core-ai by westonruter. View the logs.


4 days ago

Note: See TracTickets for help on using tickets.