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

docs: adjust plugin dev guide example to write modified contents, fixes #3655 #3656

Merged
merged 2 commits into from
Mar 20, 2019

Conversation

akrawchyk
Copy link
Contributor

@akrawchyk akrawchyk commented Mar 18, 2019

fixes #3655

@NataliaTepluhina
Copy link
Member

NataliaTepluhina commented Mar 18, 2019

@akrawchyk thank you so much for spotting this! I think I missed

    contentMain = lines.join('\n');

in my example but including end of line makes it even better.

@akrawchyk
Copy link
Contributor Author

@NataliaTepluhina no prob 😄 , I can update the example to use either EOL or \n everywhere, up to you.

@NataliaTepluhina
Copy link
Member

I think EOL is more consistent in this case so let's leave it your way 😉

@sodatea please have a final look 🙇‍♀️

@haoqunjiang
Copy link
Member

The best option is to maintain the line-ending (like prettier prettier/prettier#472)
But that may be too much for an example snippet so I think EOL is good enough.

(sidenote: Airbnb Style Guide enforces LF as line ending, while create-react-app uses os.EOL everywhere facebook/create-react-app#6610, other common style guides has no strong opinion on this, which means most people may just use os default)

docs/dev-guide/plugin-dev.md Outdated Show resolved Hide resolved
use `EOL` instead of `\n`

Co-Authored-By: akrawchyk <[email protected]>
@haoqunjiang haoqunjiang changed the base branch from dev to docs March 20, 2019 05:55
@haoqunjiang haoqunjiang changed the title adjust plugin dev guide example to write modified contents; fixes(#3655) docs: adjust plugin dev guide example to write modified contents, fixes(#3655) Mar 20, 2019
@haoqunjiang haoqunjiang changed the base branch from docs to dev March 20, 2019 06:01
@haoqunjiang haoqunjiang changed the base branch from dev to docs March 20, 2019 06:01
@haoqunjiang haoqunjiang changed the title docs: adjust plugin dev guide example to write modified contents, fixes(#3655) docs: adjust plugin dev guide example to write modified contents, fixes #3655 Mar 20, 2019
@haoqunjiang haoqunjiang merged commit ecbccc6 into vuejs:docs Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants