- Linting (ESLint): Lint per latest ash-nazg (e.g., named capture)

- Linting (ESLint): Add HTML files to linting and add devDeps for new ash-nazg
- npm: Update devDeps
This commit is contained in:
Brett Zamir
2019-07-02 12:21:21 +08:00
parent af290bd743
commit e4231aeb10
30 changed files with 313 additions and 267 deletions

View File

@@ -86,11 +86,11 @@ export default {
function getLinked (elem, attr) {
const str = elem.getAttribute(attr);
if (!str) { return null; }
const m = str.match(/\(#(.*)\)/);
if (!m || m.length !== 2) {
const m = str.match(/\(#(?<id>.+)\)/);
if (!m || !m.groups.id) {
return null;
}
return svgCanvas.getElem(m[1]);
return svgCanvas.getElem(m.groups.id);
}
/**
@@ -254,7 +254,7 @@ export default {
function convertline (elem) {
// this routine came from the connectors extension
// it is needed because midpoint markers don't work with line elements
if (!(elem.tagName === 'line')) { return elem; }
if (elem.tagName !== 'line') { return elem; }
// Convert to polyline to accept mid-arrow