mirror of
https://github.com/zadam/trilium.git
synced 2025-01-16 03:58:53 +08:00
strip # or ~ when getting attribute
This commit is contained in:
parent
5f22864a93
commit
1bc50ed976
4 changed files with 21 additions and 17 deletions
24
package-lock.json
generated
24
package-lock.json
generated
|
@ -2882,9 +2882,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"electron": {
|
"electron": {
|
||||||
"version": "13.2.2",
|
"version": "13.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/electron/-/electron-13.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/electron/-/electron-13.3.0.tgz",
|
||||||
"integrity": "sha512-thGq2YaZqQWK1HexRghxdb26a8hA7ZSebukUSHlnHrY9+Sx9rW7e3uEHbibk/seRXVoXO76HndjKdHyObP9/Kw==",
|
"integrity": "sha512-d/BvOLDjI4i7yf9tqCuLL2fFGA2TrM/D9PyRpua+rJolG0qrwp/FohP02L0m+44kmPpofIo4l3NPwLmzyKKimA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@electron/get": "^1.0.1",
|
"@electron/get": "^1.0.1",
|
||||||
|
@ -2893,9 +2893,9 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "14.17.13",
|
"version": "14.17.14",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.13.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.14.tgz",
|
||||||
"integrity": "sha512-OqG3iSnFg3cnJLsSRyhriILdDfBOwGty0fmnalbsPdYKbDgK6TI9On/36lzO/1bcaeEkg9OGD2wYLjx8t5MZNQ==",
|
"integrity": "sha512-rsAj2u8Xkqfc332iXV12SqIsjVi07H479bOP4q94NAcjzmAvapumEhuVIt53koEf7JFrpjgNKjBga5Pnn/GL8A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3397,9 +3397,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"electron-rebuild": {
|
"electron-rebuild": {
|
||||||
"version": "3.2.2",
|
"version": "3.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/electron-rebuild/-/electron-rebuild-3.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/electron-rebuild/-/electron-rebuild-3.2.3.tgz",
|
||||||
"integrity": "sha512-eeic8ZEVhMjCBviItDjL5kxYQQSlQjgVsG4dSP3/dLxwMH7o1tnPq57DWstoSpss2oYod/RvGXADSMX0XVoyfA==",
|
"integrity": "sha512-9oxNmKlDCaf651c+yJWCDIBpF6A9aY+wQtasLEeR5AsPYPuOKEX6xHnC2+WgCLOC94JEpCZznecyC84fbwZq4A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@malept/cross-spawn-promise": "^2.0.0",
|
"@malept/cross-spawn-promise": "^2.0.0",
|
||||||
|
@ -5777,9 +5777,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node-abi": {
|
"node-abi": {
|
||||||
"version": "2.30.0",
|
"version": "2.30.1",
|
||||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz",
|
||||||
"integrity": "sha512-g6bZh3YCKQRdwuO/tSZZYJAw622SjsRfJ2X0Iy4sSOHZ34/sPPdVBn8fev2tj7njzLwuqPw9uMtGsGkO5kIQvg==",
|
"integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"semver": "^5.4.1"
|
"semver": "^5.4.1"
|
||||||
},
|
},
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
"jsdom": "17.0.0",
|
"jsdom": "17.0.0",
|
||||||
"mime-types": "2.1.32",
|
"mime-types": "2.1.32",
|
||||||
"multer": "1.4.3",
|
"multer": "1.4.3",
|
||||||
"node-abi": "2.30.0",
|
"node-abi": "3.0.0",
|
||||||
"open": "8.2.1",
|
"open": "8.2.1",
|
||||||
"portscanner": "2.2.0",
|
"portscanner": "2.2.0",
|
||||||
"rand-token": "1.0.1",
|
"rand-token": "1.0.1",
|
||||||
|
@ -81,16 +81,16 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"electron": "13.2.2",
|
"electron": "14.0.0",
|
||||||
"electron-builder": "22.11.7",
|
"electron-builder": "22.11.7",
|
||||||
"electron-packager": "15.3.0",
|
"electron-packager": "15.3.0",
|
||||||
"electron-rebuild": "3.2.2",
|
"electron-rebuild": "3.2.3",
|
||||||
"esm": "3.2.25",
|
"esm": "3.2.25",
|
||||||
"jasmine": "3.9.0",
|
"jasmine": "3.9.0",
|
||||||
"jsdoc": "3.6.7",
|
"jsdoc": "3.6.7",
|
||||||
"lorem-ipsum": "2.0.3",
|
"lorem-ipsum": "2.0.3",
|
||||||
"rcedit": "3.0.1",
|
"rcedit": "3.0.1",
|
||||||
"webpack": "5.51.1",
|
"webpack": "5.51.2",
|
||||||
"webpack-cli": "4.8.0"
|
"webpack-cli": "4.8.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
|
|
@ -567,6 +567,10 @@ class Note extends AbstractEntity {
|
||||||
* @returns {Attribute[]} note's "owned" attributes - excluding inherited ones
|
* @returns {Attribute[]} note's "owned" attributes - excluding inherited ones
|
||||||
*/
|
*/
|
||||||
getOwnedAttributes(type, name) {
|
getOwnedAttributes(type, name) {
|
||||||
|
if (name && ["#", "~"].includes(name[0])) {
|
||||||
|
name = name.substr(1);
|
||||||
|
}
|
||||||
|
|
||||||
if (type && name) {
|
if (type && name) {
|
||||||
return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name);
|
return this.ownedAttributes.filter(attr => attr.type === type && attr.name === name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ const packageJson = require('../../package');
|
||||||
const {TRILIUM_DATA_DIR} = require('./data_dir');
|
const {TRILIUM_DATA_DIR} = require('./data_dir');
|
||||||
|
|
||||||
const APP_DB_VERSION = 183;
|
const APP_DB_VERSION = 183;
|
||||||
const SYNC_VERSION = 20;
|
const SYNC_VERSION = 21;
|
||||||
const CLIPPER_PROTOCOL_VERSION = "1.0";
|
const CLIPPER_PROTOCOL_VERSION = "1.0";
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
Loading…
Reference in a new issue