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

Fixed extra characters when parsing comments rows #8

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

Conversation

devdevdenis
Copy link

@devdevdenis devdevdenis commented Nov 1, 2021

On windows system I faced with strange behavior, when specify comment about required entity. After debugging I found problem. This is related to \r symbol which breaks required paths. Suggested solution is remove all extra symbols in require and drop code comments

index.js Outdated
@@ -5,15 +5,16 @@ const recursiveReadDir = require('recursive-readdir')

function parseComments(file) {
const lines = file.split('\n'), require = []
const extraCharactersRegexp = new RegExp(/[\r\n]/)
Copy link
Contributor

Choose a reason for hiding this comment

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

isn't file.split(/\r?\n/) solve the issue?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it's works

@jifeon
Copy link
Contributor

jifeon commented Nov 1, 2021

@michael-bogdanov can we merge it to make work on windows a bit simpler?

@jifeon
Copy link
Contributor

jifeon commented Nov 10, 2021

@michael-bogdanov if you take a look at latest commits in this repo, they are made by guys from Plyo:

Any chance you can make me a maintainer of this repo, so we can stop using our fork and merge everything more efficiently?

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