Skip to content

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)

 use `EOL` instead of `\n` Co-Authored-By: akrawchyk <903716+akrawchyk@users.noreply.github.com>
@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

3 participants