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

Add backtick and Unicode replacement #22

Merged
merged 4 commits into from Dec 28, 2021

Conversation

mkim219
Copy link
Contributor

@mkim219 mkim219 commented Dec 28, 2021

Issue #13

Replace back-tick to '
Replace single and double curly quotation to ' and "


This change is Reviewable

index.html Outdated
@@ -24,7 +24,10 @@
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
.replace(/'/g, "&#039;")
Copy link
Owner

Choose a reason for hiding this comment

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

This changes how the tracks are displayed but doesn't address the issue at all. The parser needs to replace these. You will also need to include unit tests.

Here is a similar diff: #2

Copy link
Owner

@elliotchance elliotchance left a comment

Choose a reason for hiding this comment

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

See comment.

parse.test.js Show resolved Hide resolved
parse.js Outdated
@@ -75,6 +75,9 @@ function parseTracks(str, lineMode) {
.replace(/`/g, "'")
.replace(/[\u2018\u2019]/g, "'");

// Replace double smart quotes with regular apostrophes
track.title = track.title.replace(/[\u201C\u201D]/g, "'");
Copy link
Owner

Choose a reason for hiding this comment

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

Smart double quotes need to be replaced with double quotes ".

@elliotchance elliotchance merged commit b6fa988 into elliotchance:main Dec 28, 2021
@elliotchance
Copy link
Owner

Thanks @mkim219 !

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.

None yet

2 participants