Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 173857 - Links like 'https:' in the comment are not recognized by the parser
Links like 'https:' in the comment are not recognized by the parser
Status: RESOLVED FIXED
Product: ruby
Classification: Unclassified
Component: Editing
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Erno Mononen
issues@ruby
: NETFIX
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-06 12:01 UTC by ehartmann
Modified: 2010-04-07 11:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ehartmann 2009-10-06 12:01:47 UTC
In a comment links like http:// are recognized but not https://

Again, a small patch, Erno : 

diff -r 0e4b7628a161 ruby/src/org/netbeans/modules/ruby/lexer/RubyCommentLexer.java
--- a/ruby/src/org/netbeans/modules/ruby/lexer/RubyCommentLexer.java	Tue Oct 06 13:31:35 2009 +0400
+++ b/ruby/src/org/netbeans/modules/ruby/lexer/RubyCommentLexer.java	Tue Oct 06 13:01:05 2009 +0200
@@ -248,11 +248,22 @@
                     if (input.read() == 't') {
                         if (input.read() == 't') {
                             if (input.read() == 'p') {
-                                if (input.read() == ':') {
-                                    foundLinkBegin = true;
-                                } else {
-                                    input.backup(4);
-                                }
+				int next = input.read();
+				switch (next) {
+				    case ':':
+                                        foundLinkBegin = true;
+                                        break;
+				    case 's':
+                                        if (input.read() == ':') {
+                                            foundLinkBegin = true;
+                                        } else {
+                                            input.backup(5);
+                                        }
+					break;
+                                   default:
+                                        input.backup(4);
+                                        break;
+				}
                             } else {
                                 input.backup(3);
                             }
Comment 1 Erno Mononen 2009-10-07 09:18:32 UTC
Patch applied in e8a823ca5ad2 - thanks!
Comment 2 Quality Engineering 2009-10-09 23:05:44 UTC
Integrated into 'main-golden', will be available in build *200910091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e8a823ca5ad2
User: Erno Mononen <emononen@netbeans.org>
Log: #173857: Links like 'https:' in the comment are not recognized by the parser
Comment 3 Jiri Kovalsky 2010-04-07 11:31:29 UTC
Issue added to list [1] of community fixed bugs.

[1] http://wiki.netbeans.org/NetFIXIssues


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo