Skip to content

Commit

Permalink
gadgets-sync: fix replace bug
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed May 3, 2024
1 parent e9263ad commit dd1b7a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gadgets-sync/gadgets-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const editReqCategories = new Set([

const substitutedHeader = header.replaceAll('$SOURCE', conf.source)

if (source.data !== destination.data.replace('^' + Mwn.util.escapeRegExp(substitutedHeader), '')) {
if (source.data !== destination.data.replace(substitutedHeader, '')) {
if (await new bot.Page(talkTitle).exists()) {
let talkCategories = (await new bot.Page(talkTitle).categories()).map(e => e.category)
if (setIntersection(talkCategories, editReqCategories).size > 0) {
Expand Down

0 comments on commit dd1b7a3

Please sign in to comment.