From fc7c9ceeece0bf2c8ad6e0ae3863ecabf6b8ea39 Mon Sep 17 00:00:00 2001 From: Lapo Luchini Date: Sat, 29 Aug 2009 06:46:32 +0000 Subject: [PATCH] Underscores are under the line and we're now using nowrap anyways so spaces are good. Shows number of elements also for constructed nodes. --- asn1.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asn1.js b/asn1.js index 05ee762..db340af 100644 --- a/asn1.js +++ b/asn1.js @@ -179,7 +179,7 @@ ASN1.prototype.content = function() { return null; var tagClass = this.tag >> 6; if (tagClass != 0) // universal - return null; + return (this.sub == null) ? null : "(" + this.sub.length + ")"; var tagNumber = this.tag & 0x1F; var content = this.posContent(); var len = Math.abs(this.length); @@ -258,7 +258,7 @@ ASN1.prototype.toDOM = function() { node.asn1 = this; var head = document.createElement("div"); head.className = "head"; - var s = this.typeName(); + var s = this.typeName().replace(/_/, ' '); head.innerHTML = s; var content = this.content(); //TODO: escape HTML if (content != null) { -- 2.51.2