mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-09-25 23:44:55 -04:00
* Optimize markdownify allocations with in-place gsub and combined regex Avoid chaining multiple full-string copies during markdown parsing. Duplicate the input string once in ApplicationHelper#markdownify and modify it in-place using gsub! in GrowstuffMarkdown#expand_crops! and #expand_members!. Combine MEMBER_REGEX and MEMBER_AT_REGEX with Regexp.union to parse member mentions in a single pass. Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com> * Apply suggestion from @CloCkWeRX * Apply suggestion from @CloCkWeRX * Optimize markdownify allocations with in-place gsub and combined regex Avoid chaining multiple full-string copies during markdown parsing. Duplicate the input string once in ApplicationHelper#markdownify and modify it in-place using gsub! in GrowstuffMarkdown#expand_crops! and #expand_members!. Combine MEMBER_REGEX and MEMBER_AT_REGEX with Regexp.union to parse member mentions in a single pass. Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>