Skip to content

Commit

Permalink
fix: remove console.error to fix crash on iOS (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictb authored Aug 9, 2024
1 parent 7443e23 commit acfb063
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
7 changes: 7 additions & 0 deletions parser/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ test('labeled link', () => {
{type: 'link', start: 7, length: 19},
{type: 'syntax', start: 26, length: 1},
]);

expect('[ Link ](https://example.com)').toBeParsedAs([
{type: 'syntax', start: 0, length: 1},
{type: 'syntax', start: 7, length: 2},
{type: 'link', start: 9, length: 19},
{type: 'syntax', start: 28, length: 1},
]);
});

test('link with same label as href', () => {
Expand Down
1 change: 0 additions & 1 deletion parser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ function parseExpensiMarkToRanges(markdown: string): Range[] {
const groupedRanges = groupRanges(sortedRanges);
return groupedRanges;
} catch (error) {
console.error(error);
// returning an empty array in case of error
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
"typescript": "^5.3.3"
},
"dependencies": {
"expensify-common": "2.0.64"
"expensify-common": "2.0.72"
}
}
4 changes: 2 additions & 2 deletions parser/react-native-live-markdown-parser.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2647,7 +2647,7 @@ __metadata:
"@types/underscore": ^1.11.15
esbuild: 0.19.4
esbuild-plugin-tsc: ^0.4.0
expensify-common: 2.0.64
expensify-common: 2.0.72
jest: ^29.7.0
typescript: ^5.3.3
languageName: unknown
Expand Down Expand Up @@ -9967,9 +9967,9 @@ __metadata:
languageName: node
linkType: hard

"expensify-common@npm:2.0.64":
version: 2.0.64
resolution: "expensify-common@npm:2.0.64"
"expensify-common@npm:2.0.72":
version: 2.0.72
resolution: "expensify-common@npm:2.0.72"
dependencies:
awesome-phonenumber: ^5.4.0
classnames: 2.5.0
Expand All @@ -9981,10 +9981,10 @@ __metadata:
prop-types: 15.8.1
react: 16.12.0
react-dom: 16.12.0
semver: ^7.6.2
semver: ^7.6.3
simply-deferred: "git+https://github.com/Expensify/simply-deferred.git#77a08a95754660c7bd6e0b6979fdf84e8e831bf5"
ua-parser-js: ^1.0.38
checksum: c58c9404da09be588be799798f03e2c74c5598b069218e6a895b65bb8e7132f11820c4f1b50f8e92fcb39b498f71159d75fadd90112632eac250dd09a346488a
checksum: b1331aad5a512ffeb67fcb657025f2a2bfe86d3d905cbc0d09b8dff856562ecb2be5c0bbd37bd218f6bc8309f0417e52b918ea4132dfddd555dd3bfa1c89cb89
languageName: node
linkType: hard

Expand Down Expand Up @@ -18087,12 +18087,12 @@ __metadata:
languageName: node
linkType: hard

"semver@npm:^7.6.2":
version: 7.6.2
resolution: "semver@npm:7.6.2"
"semver@npm:^7.6.3":
version: 7.6.3
resolution: "semver@npm:7.6.3"
bin:
semver: bin/semver.js
checksum: 40f6a95101e8d854357a644da1b8dd9d93ce786d5c6a77227bc69dbb17bea83d0d1d1d7c4cd5920a6df909f48e8bd8a5909869535007f90278289f2451d0292d
checksum: 4110ec5d015c9438f322257b1c51fe30276e5f766a3f64c09edd1d7ea7118ecbc3f379f3b69032bacf13116dc7abc4ad8ce0d7e2bd642e26b0d271b56b61a7d8
languageName: node
linkType: hard

Expand Down

0 comments on commit acfb063

Please sign in to comment.