This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 173857 - Links like 'https:' in the comment are not recognized by the parser
Summary: Links like 'https:' in the comment are not recognized by the parser
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords: NETFIX
Depends on:
Blocks:
 
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
Exception Reporter:


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