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

Provides full coverage for shared functions (shared.js) #99

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

erikyo
Copy link
Collaborator

@erikyo erikyo commented May 13, 2024

Covers 'shared' functions with tests

@johnhooks can you take a look at this? I tested the result with the original function, and with the current updated code and it seems there are some issues, and this condition cannot be verified:

// ensure that the line never ends with a partial escaping
// make longer lines if needed
while (curLine.substr(-1) === '\\' && pos + curLine.length < len) {
curLine += str.charAt(pos + curLine.length);
}

Precisely in this row (from the original shared.js before any modification):
while (curLine.substr(-1) === '\\' && pos + curLine.length < len) {

It was intended \\\\ and not \\?

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