[Pkg-javascript-commits] [ltx] 04/25: fix bug if comment contains some other tag

Jonas Smedegaard dr at jones.dk
Tue Jan 10 18:21:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository ltx.

commit b3fcb196192a8ac7c63b231aa0d95c527458b697
Author: Ajay Kumar Yadav <ajya at microsoft.com>
Date:   Thu Nov 3 19:29:21 2016 +0530

    fix bug if comment contains some other tag
---
 lib/parsers/ltx.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/parsers/ltx.js b/lib/parsers/ltx.js
index 129af8d..ac57f0e 100644
--- a/lib/parsers/ltx.js
+++ b/lib/parsers/ltx.js
@@ -88,7 +88,11 @@ var SaxLtx = module.exports = function SaxLtx () {
           break
         case STATE_IGNORE_TAG:
           if (c === 62 /* > */) {
-            state = STATE_TEXT
+            var prev_first = data.charCodeAt(pos-1);
+            var prev_second = data.charCodeAt(pos-2);
+            if( prev_first === 45 /* - */ && prev_second === 45 /* - */){
+                state = STATE_TEXT
+            }
           }
           break
         case STATE_TAG:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git



More information about the Pkg-javascript-commits mailing list