From c8fad99f9046996fbdcf8bb563e7a40d31bb622a Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 23 Jul 2024 15:16:12 -0700 Subject: [PATCH] fixed bug for highlighting not working on new document --- static/application.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/application.js b/static/application.js index 58774d2..bf126f4 100644 --- a/static/application.js +++ b/static/application.js @@ -281,6 +281,10 @@ haste.prototype.lockDocument = function() { _this.$textarea.val('').hide(); _this.$box.show().focus(); _this.addLineNumbers(ret.lineCount); + // Load Document Again + var path = window.location.href; + console.log(path); + _this.loadDocument(path.split('#')[0].split('/').slice(-1)[0]); } }); };