diff --git a/src/aragraph.js b/src/aragraph.js index 29b368e..e1edc6b 100644 --- a/src/aragraph.js +++ b/src/aragraph.js @@ -14,7 +14,7 @@ const ARAAPPS = { } function graphNormalizeEntity(e){ - return e.replace(/[-\s\`\[\]]+/g, '_').trim("_"); + return e.trim().replace(/[-\s\`\[\]]+/g, '_').replace(/(^_)|(_$)/g, ""); } function nullify(n){