Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: simplify line-break regexes, separate text wrapping #8715

Merged
merged 3 commits into from
Oct 30, 2024

Conversation

Mrazator
Copy link
Member

@Mrazator Mrazator commented Oct 25, 2024

Decided to refactor the line break regexes into a human-readable format, as I (author) was already getting lost in the (albeit simple) rules.

image

Also done:

Waits for #8714 cc @dwelle

Follows #8530

Copy link

vercel bot commented Oct 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Oct 30, 2024 1:20pm
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Oct 30, 2024 1:20pm
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview Oct 30, 2024 1:20pm
1 Skipped Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Oct 30, 2024 1:20pm

Copy link

github-actions bot commented Oct 25, 2024

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 67.34% (🎯 60%) 66398 / 98596
🟢 Statements 67.34% (🎯 60%) 66398 / 98596
🟢 Functions 64.22% (🎯 63%) 1941 / 3022
🟢 Branches 79.99% (🎯 70%) 7935 / 9919
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/excalidraw/components/App.tsx 70.03% 77.57% 71.71% 70.03% 505-506, 618-627, 727-728, 746-747, 768-828, 831-837, 850-853, 856-932, 935-954, 957-962, 970-980, 982-983, 988-989, 993-995, 1009, 1016-1278, 1338-1339, 1371-1373, 1380-1425, 1451, 1461, 1468-1471, 1480-1484, 1515-1516, 1594-1604, 1609-1624, 1628-1675, 1771-1776, 1805-1810, 1813-1843, 1851-1876, 1889-1980, 1983-1991, 1994-2053, 2056-2097, 2100-2105, 2140-2141, 2164-2165, 2197-2198, 2202-2203, 2223-2231, 2236-2249, 2255-2256, 2260, 2265-2273, 2275-2283, 2295, 2340-2341, 2363-2364, 2371, 2392-2394, 2454-2456, 2459-2464, 2469-2470, 2510-2518, 2523-2532, 2570-2571, 2663-2664, 2668, 2671-2672, 2680-2683, 2692-2705, 2711-2714, 2717, 2719-2720, 2727-2728, 2734-2735, 2738-2739, 2747-2748, 2751-2752, 2763-2771, 2776-2777, 2828-2829, 2843-2849, 2855-2863, 2867-2875, 2879-2880, 2883-2916, 2919-2931, 2942-2943, 2954-2955, 2972-2976, 2980-2983, 2990-2992, 3010-3017, 3020, 3022-3027, 3031-3033, 3079-3080, 3087-3089, 3091-3114, 3131-3163, 3178, 3184, 3241-3244, 3247-3248, 3265-3267, 3289-3290, 3296-3300, 3306-3387, 3441, 3445, 3480-3481, 3540, 3550-3568, 3571-3577, 3580-3581, 3587-3603, 3716-3717, 3740-3754, 3762-3768, 3782-3783, 3789-3798, 3855-3856, 3928-3938, 3974, 4123-4124, 4126-4133, 4167-4171, 4173-4174, 4176-4179, 4204-4205, 4227-4237, 4247-4249, 4251, 4332-4335, 4357-4365, 4369-4371, 4381-4382, 4384-4404, 4411-4434, 4437-4443, 4460-4463, 4475-4482, 4578-4582, 4586, 4591-4592, 4597-4601, 4634-4635, 4638-4639, 4651-4655, 4660-4661, 4667-4677, 4682-4709, 4714-4725, 4825-4826, 4910, 4935, 4961-4963, 5030-5031, 5049-5050, 5241-5242, 5245-5246, 5254-5255, 5310-5314, 5368-5375, 5381-5451, 5495, 5552, 5579, 5586-5587, 5600-5603, 5634, 5687-5690, 5693-5697, 5699-5706, 5723-5732, 5735-5736, 5866-5867, 5870, 5872-5877, 5883-5885, 5887, 5896, 5918-5923, 5925-5928, 5932-5933, 5943-6039, 6043-6044, 6059-6060, 6096-6102, 6129-6130, 6142-6143, 6171, 6173-6200, 6207-6208, 6230-6231, 6250, 6252-6295, 6300-6301, 6303-6304, 6320-6321, 6327-6328, 6332-6335, 6338-6339, 6353-6379, 6387-6388, 6392-6395, 6397-6401, 6419-6423, 6470-6475, 6477-6479, 6495, 6497-6510, 6535-6538, 6593, 6610-6611, 6613-6636, 6651-6652, 6766-6794, 6849-6850, 6913-6914, 6941-6942, 7036, 7042-7043, 7066-7085, 7100, 7248-7286, 7290-7340, 7355, 7364, 7398-7404, 7431-7433, 7599-7602, 7624-7654, 7667, 7669-7677, 7691, 7693-7701, 7708-7711, 7719-7724, 7756-7757, 7760-7762, 7765-7766, 7789-7790, 7796-7797, 7824-7825, 7908-7909, 7956-7969, 7973-8059, 8136-8139, 8165-8166, 8223, 8246-8252, 8263-8282, 8310-8316, 8348, 8390, 8396, 8411-8418, 8421-8428, 8483, 8561-8562, 8583-8585, 8588, 8602-8626, 8735-8748, 8771-8795, 8804-8843, 8856-8857, 8866-8873, 8891-8898, 8952-8957, 8966-8990, 8992-8993, 9067-9068, 9075, 9077-9113, 9142, 9201, 9240-9242, 9267-9272, 9274-9275, 9280-9282, 9285-9305, 9319-9320, 9326-9335, 9340, 9344-9348, 9357-9361, 9364-9369, 9373-9380, 9409, 9411-9415, 9417-9427, 9443-9445, 9456-9464, 9468-9512, 9515-9586, 9594, 9612-9619, 9621-9643, 9658-9680, 9699-9701, 9747-9748, 9859-9863, 9865-9881, 9883-9887, 9899-9900, 9910-9926, 9945-9964, 9966-9967, 9994-9995, 9999-10000, 10010, 10012-10015, 10017-10018, 10058, 10099-10100, 10110, 10152, 10170-10178, 10189-10205, 10207-10255, 10278-10279, 10311-10314, 10407-10414, 10440-10441, 10486-10557, 10605-10606, 10615-10618, 10623-10624, 10645-10647, 10649-10653, 10691
packages/excalidraw/element/embeddable.ts 31.68% 20% 42.85% 31.68% 85-86, 89-282, 285-319, 327-346, 360-377, 387-388, 392-393, 397-398, 401-402, 406-407, 417-418, 420-442
packages/excalidraw/element/newElement.ts 92.01% 90.17% 85.71% 92.01% 143-148, 151-158, 178-192, 210, 382, 384-387, 404-405, 516, 522-523, 538-555, 592-593
packages/excalidraw/element/resizeElements.ts 94.68% 81.17% 100% 94.68% 161, 175-183, 220-221, 272-273, 294-299, 302-303, 305-306, 309-311, 568-569, 620-621, 725-731, 809-810, 853-854, 859, 863, 969-970, 982-983, 986-987, 1061-1062, 1081-1090
packages/excalidraw/element/textElement.ts 92.9% 92.9% 91.42% 92.9% 67, 181-182, 222, 366, 368-377, 385-387, 433-434, 461-468, 490-491, 506-507, 546-553, 735-747
packages/excalidraw/element/textWrapping.ts 96.65% 94.73% 92.5% 96.65% 25-26, 121-124, 232-234, 310-317, 565-566
packages/excalidraw/element/textWysiwyg.tsx 85.17% 77.45% 76.47% 85.17% 67-68, 70-71, 128-129, 251, 331-361, 366-372, 387-389, 399-405, 407-409, 413, 520-524, 532-533, 543-544, 554-559, 594-595, 619, 632-637, 645-652, 660, 664, 667-668, 674-683, 716-719
packages/excalidraw/fonts/Fonts.ts 83.72% 75.75% 86.95% 83.72% 58-64, 70-71, 101-108, 113-135, 152, 170, 180-182, 263, 267-284, 296-301, 304-306, 315-316, 324-328, 471, 478-479, 492
Generated in workflow #3736 for commit 1214b75 by the Vitest Coverage Report Action

@Mrazator Mrazator marked this pull request as draft October 25, 2024 17:30
@Mrazator Mrazator force-pushed the mrazator/simplify-regexes branch from a2df548 to 696093a Compare October 28, 2024 20:23
@Mrazator Mrazator changed the title fix: simplify CJK regexes fix: simplify line-break regexes Oct 28, 2024
@Mrazator Mrazator requested a review from dwelle October 28, 2024 20:40
@Mrazator Mrazator changed the title fix: simplify line-break regexes chore: simplify line-break regexes, separate text wrapping Oct 28, 2024
@Mrazator Mrazator marked this pull request as ready for review October 28, 2024 20:47
@Mrazator Mrazator force-pushed the mrazator/simplify-regexes branch from 696093a to 8b780f5 Compare October 29, 2024 08:15
@Mrazator Mrazator changed the base branch from master to mrazator/fix-trailing-line-whitespaces-layout-shift October 29, 2024 08:15
@Mrazator Mrazator force-pushed the mrazator/simplify-regexes branch from 8b780f5 to 91d1adc Compare October 29, 2024 10:28
Base automatically changed from mrazator/fix-trailing-line-whitespaces-layout-shift to master October 30, 2024 13:11
@Mrazator Mrazator force-pushed the mrazator/simplify-regexes branch from 91d1adc to 4dd237f Compare October 30, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants