We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f35bac commit 0d0d593Copy full SHA for 0d0d593
index.js
@@ -74,7 +74,8 @@ name.decode = function (buf, offset) {
74
name.decode.bytes = 0
75
76
name.encodingLength = function (n) {
77
- return Buffer.byteLength(n) + 2
+ if (n === '.') return 1
78
+ return Buffer.byteLength(n.replace(/^\.|\.$/gm, '')) + 2
79
}
80
81
var string = {}
0 commit comments