Skip to content

Commit

Permalink
Merge pull request #1188 from stevencohn/1126-keep-space-before-match
Browse files Browse the repository at this point in the history
Keep space before match
  • Loading branch information
stevencohn authored Nov 28, 2023
2 parents ffb3a31 + 3ca5e50 commit a5cb773
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OneMore/Commands/References/LinkReferencesCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private async Task Execute(UI.ProgressDialog progress, CancellationToken token)
var whatText = $@"(?:^|\b|\s)({title.EscapeForRegex()})(?:$|\b|\s)";
var pageLink = one.GetHyperlink(page.PageId, string.Empty);

var withElement = new XElement("A",
var withElement = new XElement("a",
new XAttribute("href", pageLink),
title
);
Expand Down
2 changes: 1 addition & 1 deletion OneMore/Commands/Search/SearchAndReplaceEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private int SearchAndReplace(XElement element)
}
else if (match.Groups.Count > 1)
{
Replace(wrapper, match.Index, match.Length,
Replace(wrapper, match.Groups[1].Index, match.Groups[1].Length,
replaceElement == null ? ExpandReplacement(match) : null);
}
}
Expand Down

0 comments on commit a5cb773

Please sign in to comment.