Fix join line scripts not handling Windows CRLF line endings#402
Open
tathagat22 wants to merge 148 commits into
Open
Fix join line scripts not handling Windows CRLF line endings#402tathagat22 wants to merge 148 commits into
tathagat22 wants to merge 148 commits into
Conversation
Hello! A simple script to generate hashtags #cool 😎
Feat/release readiness
Enable mouse interactions
Added SHA1, SHA256, and SHA512 algorithms like done for MD5
This script converts data that was serialized by using php's serialize() function into pretty printed json
Add Support for Spongebob Sarcasm Text Script
Create generateHashatg.js
…alize Add PhpUnserialize script
Added List to HTML and Derpify.js
fix: typo in generate hashtag script
fix: applicationWillFinishLaunching will prevent Boop from flickering…
fix(csvToJson): address CSV complexities
digi 2 ascii
Add script to convert JS arrays/objects to PHP associative array.
Add scripts for converting decimals to hexadecimal strings and decima…
Promoted url script, fixed error, added icon
Promoted sort, added array sorting
…h-path Add Fish PATH Hex Converter
…eneratorScript Script: Generate Project Glossary Markdown file
Supporting SF Symbols identifiers for script icons
Release/1.4.0
Fixed popover issue
Custom Script for tsv to json.
Adding CalculateSize.js script to calc size of input.text in bytes
Yes, this means development is becoming more active again.
…vanMathy#128) The three Join Lines scripts used /\n/g which only matched Unix line endings. Text pasted from Windows apps uses \r\n, leaving \r characters behind and causing incorrect output. Updated all three scripts to use /\r\n|\r|\n/g so they handle Unix, Windows, and legacy Mac line endings.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
Fixes #128 — all three Join Lines scripts (
JoinLines,JoinLinesWithSpace,JoinLinesWithComma) only worked correctly with Unix line endings (\n). Text pasted from Windows apps uses\r\n, which caused the scripts to leave\rcharacters behind, resulting in broken/partial output.Why
The original regex
/\n/gmatches only Unix newlines. Windows line endings are\r\n, so after removing\n, a stray\r(carriage return) remained in the output. This made the joined text appear incorrectly in the editor.Fix
Changed all three scripts from:
to:
This handles all three common line ending styles:
\n\r\n\rTesting
Verified with Node.js that 4-line text with
\r\nendings is now fully joined across all scripts.