Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Refactor stripFilePaths to better detect OK paths #729

Merged
merged 1 commit into from Jun 17, 2021

Conversation

srawlins
Copy link
Contributor

Fixes dart-lang/dart-pad#1920

  • Remove dependency on expected_output; this package used mirrors, and our sole use was tests for stripFilePaths
  • Rename stripFilePaths as it does not exclusively strip them
  • Improve regex
  • Improve performance; static pattern, non-eager checks for different substrings

@google-cla google-cla bot added the cla: yes label Jun 17, 2021
Copy link
Contributor

@parlough parlough left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Much better cleanup than the patch I initially worked on just for the URL case.


test('normalizeFilePaths keeps a web URL intact', () {
expectNormalizeFilePaths(
'See http://dart.dev/go/non-promo-property',

This comment was marked as resolved.

@srawlins srawlins merged commit 6bfe6d8 into dart-archive:master Jun 17, 2021
@srawlins srawlins deleted the strip-file-paths branch June 17, 2021 20:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3 participants