Skip to content

Commit 51a5262

Browse files
author
Skyweb331
authored
Bump expensify-common to 2.0.46 and fix handling br tag (#431)
1 parent b5d969f commit 51a5262

File tree

5 files changed

+47
-28
lines changed

5 files changed

+47
-28
lines changed

parser/__tests__/index.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,15 @@ describe('email with same label as address', () => {
177177
});
178178
});
179179

180+
test('email with multiline hyperlinks', () => {
181+
expect('[test\ntest](test@test.com)').toBeParsedAs([
182+
{type: 'syntax', start: 0, length: 1},
183+
{type: 'syntax', start: 10, length: 2},
184+
{type: 'link', start: 12, length: 13},
185+
{type: 'syntax', start: 25, length: 1},
186+
]);
187+
});
188+
180189
test('inline code', () => {
181190
expect('Hello `world`!').toBeParsedAs([
182191
{type: 'syntax', start: 6, length: 1},

parser/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ function parseTreeToTextAndRanges(tree: StackItem): [string, Range[]] {
153153
} else if (node.tag === '<h1>') {
154154
appendSyntax('# ');
155155
addChildrenWithStyle(node, 'h1');
156+
} else if (node.tag === '<br />') {
157+
text += '\n';
156158
} else if (node.tag.startsWith('<pre')) {
157159
appendSyntax('```');
158160
const content = node.children.join('').replaceAll('&#32;', ' ');

parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
"typescript": "^5.3.3"
2323
},
2424
"dependencies": {
25-
"expensify-common": "2.0.35"
25+
"expensify-common": "2.0.46"
2626
}
2727
}

parser/react-native-live-markdown-parser.js

Lines changed: 21 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yarn.lock

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,7 +2647,7 @@ __metadata:
26472647
"@types/underscore": ^1.11.15
26482648
esbuild: 0.19.4
26492649
esbuild-plugin-tsc: ^0.4.0
2650-
expensify-common: 2.0.35
2650+
expensify-common: 2.0.46
26512651
jest: ^29.7.0
26522652
typescript: ^5.3.3
26532653
languageName: unknown
@@ -9967,9 +9967,9 @@ __metadata:
99679967
languageName: node
99689968
linkType: hard
99699969

9970-
"expensify-common@npm:2.0.35":
9971-
version: 2.0.35
9972-
resolution: "expensify-common@npm:2.0.35"
9970+
"expensify-common@npm:2.0.46":
9971+
version: 2.0.46
9972+
resolution: "expensify-common@npm:2.0.46"
99739973
dependencies:
99749974
awesome-phonenumber: ^5.4.0
99759975
classnames: 2.5.0
@@ -9983,8 +9983,8 @@ __metadata:
99839983
react-dom: 16.12.0
99849984
semver: ^7.6.2
99859985
simply-deferred: "git+https://github.com/Expensify/simply-deferred.git#77a08a95754660c7bd6e0b6979fdf84e8e831bf5"
9986-
ua-parser-js: ^1.0.37
9987-
checksum: eeceea5fc03849c95af12c04a29c5c97a89a61e4714cdfc401ea5f15e8a4284557c5b77e5cbb77c0f0905a6e9d608f3b4e079ba310f32188a0ff4d2ad356a5b5
9986+
ua-parser-js: ^1.0.38
9987+
checksum: f2dd73ac10efc9c8cf512c810c3e07a3a865c1af4dc7742e07449a06ac1d91e4583dff15f79567bbd48e8f6c11ea10f20dd46c680d8f450b960799a881d44115
99889988
languageName: node
99899989
linkType: hard
99909990

@@ -19801,13 +19801,20 @@ __metadata:
1980119801
languageName: node
1980219802
linkType: hard
1980319803

19804-
"ua-parser-js@npm:^1.0.35, ua-parser-js@npm:^1.0.37":
19804+
"ua-parser-js@npm:^1.0.35":
1980519805
version: 1.0.37
1980619806
resolution: "ua-parser-js@npm:1.0.37"
1980719807
checksum: 4d481c720d523366d7762dc8a46a1b58967d979aacf786f9ceceb1cd767de069f64a4bdffb63956294f1c0696eb465ddb950f28ba90571709e33521b4bd75e07
1980819808
languageName: node
1980919809
linkType: hard
1981019810

19811+
"ua-parser-js@npm:^1.0.38":
19812+
version: 1.0.38
19813+
resolution: "ua-parser-js@npm:1.0.38"
19814+
checksum: d0772b22b027338d806ab17d1ac2896ee7485bdf9217c526028159f3cd6bb10272bb18f6196d2f94dde83e3b36dc9d2533daf08a414764f6f4f1844842383838
19815+
languageName: node
19816+
linkType: hard
19817+
1981119818
"uglify-js@npm:^3.1.4":
1981219819
version: 3.17.4
1981319820
resolution: "uglify-js@npm:3.17.4"

0 commit comments

Comments
 (0)