diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-12-26 14:09:37 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-12-26 14:09:37 -1000 |
commit | 0c6c333f1c7b9c3ab062d26a4b2541de055307f6 (patch) | |
tree | 48517c81acd3341741539968aae4c8cc7cf4b592 /lib/util.js | |
parent | e6c57e42071b9b49737c820a3cdfd14cd4864ce3 (diff) | |
download | patchfoo-0c6c333f1c7b9c3ab062d26a4b2541de055307f6.tar.gz patchfoo-0c6c333f1c7b9c3ab062d26a4b2541de055307f6.zip |
Use textarea for code blocks
Diffstat (limited to 'lib/util.js')
-rw-r--r-- | lib/util.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/util.js b/lib/util.js index 7425513..15eb295 100644 --- a/lib/util.js +++ b/lib/util.js @@ -218,3 +218,7 @@ u.unescapeId = function (str) { if (!m) return b64url.unescape(str) return m[1] + b64url.unescape(m[2]) + m[3] } + +u.rows = function (str) { + return String(str).split(/[^\n]{150}|\n/).length +} |