Skip to content

fix(escapeTitle): different RegEx#242

Open
avivkeller wants to merge 2 commits into
mainfrom
aduh95-suggestion
Open

fix(escapeTitle): different RegEx#242
avivkeller wants to merge 2 commits into
mainfrom
aduh95-suggestion

Conversation

@avivkeller

Copy link
Copy Markdown
Member

I don't personally see the difference between these two RegExps, but if @aduh95 thinks it's better, then it's probably better :-)

Co-Authored-By: aduh95 <aduh95@noreply.users.github.com>
Copilot AI review requested due to automatic review settings July 1, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the escapeTitle() implementation used when rendering agenda issue titles into templates/meeting.mustache, aiming to change how square brackets are escaped so markdown link rendering isn’t broken by bracket characters in GitHub issue titles.

Changes:

  • Replaced the escapeTitle() escaping logic with a new regular expression intended to handle bracket escaping differently.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/meeting.mjs Outdated
Comment on lines +59 to +60
const escapeTitle = title =>
title.replace(/\\/g, '\\\\').replace(/([\[\]])/g, '\\$1');
title.replace(/(?<!\\)(?:\\\\)*([[\]])/g, '\\$1');
Comment thread src/meeting.mjs Outdated
*/
const escapeTitle = title =>
title.replace(/\\/g, '\\\\').replace(/([\[\]])/g, '\\$1');
title.replace(/(?<!\\)(?:\\\\)*([[\]])/g, '\\$1');
Comment thread src/meeting.mjs Outdated
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Copilot AI review requested due to automatic review settings July 1, 2026 21:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread src/meeting.mjs
*/
const escapeTitle = title =>
title.replace(/\\/g, '\\\\').replace(/([\[\]])/g, '\\$1');
title.replace(/(?<!\\)(\\\\)*([[\]])/g, '$1\\$2');

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding more tests sounds good if the robot wants to write them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants