diff --git a/README.md b/README.md index 4c7c185..b372203 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ To contribute a change, [check out the contributing guide](CONTRIBUTING.md). ### Local Development -Run `npm run start` to start a watching build rollup server. To view the sample pages in the repo, you can run `npm run serve` as a separate process which starts a static server. `npm run build` will run a one-time build. +First, run `npm install` to install all node modules required. Then, run `npm run dev` to start a watching build rollup server. To view the sample pages in the repo, you can run `npm run serve` as a separate process which starts a static server. `npm run build` will run a one-time build. ## Disclaimer & License diff --git a/src/components/d-cite.js b/src/components/d-cite.js index 48917af..4da4388 100644 --- a/src/components/d-cite.js +++ b/src/components/d-cite.js @@ -102,7 +102,7 @@ export class Cite extends T(HTMLElement) { attributeChangedCallback(name, oldValue, newValue) { const eventName = oldValue ? 'onCiteKeyChanged' : 'onCiteKeyCreated'; - const keys = newValue.split(','); + const keys = newValue.split(',').map(k => k.trim()); const options = { detail: [this, keys], bubbles: true }; const event = new CustomEvent(eventName, options); document.dispatchEvent(event);