Merge pull request #100 from distillpub/d-cite-keys-whitespace

Trim whitespace
This commit is contained in:
Ludwig Schubert
2018-12-28 19:59:06 +00:00
committed by GitHub
+1 -1
View File
@@ -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);