Skip to content

Commit

Permalink
Check-in a performance optimization for the HTML markup engine.
Browse files Browse the repository at this point in the history
  • Loading branch information
designingpatts committed Aug 28, 2008
1 parent 9a38317 commit 7cd5177
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
2 changes: 2 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* All built-in templates now output valid, strict XHTML.
* The documentation is slightly better organized (the markup details were
merged into the RDoc module's documentation).
* Improve rdoc's HTML generation speed by about 20%.

* N Bug fixes:
* Fixed prototype detection in C parser. Can process ruby 1.8 C files
Expand All @@ -34,6 +35,7 @@
quotes, and closing single quotes in most cases (smart single quotes).
** RDoc now correctly converts " characters to opening double quotes and
and closing double quotes in most cases (smart double quotes).
** (c) correctly is converted into the copyright symbol.
* Fixed main page for frameless template. Patch by Marcin Raczkowski.
* Fixed missing stylesheet in generated chm. Patch by Gordon Thiesfeld.
* '&' characters in text now correctly are translated to HTML character
Expand Down
15 changes: 10 additions & 5 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
= \RDoc

* http://rubyforge.org/projects/rdoc/
* Project Page: http://rubyforge.org/projects/rdoc/
* Documentation: http://rdoc.rubyforge.org/

== DESCRIPTION:

Expand Down Expand Up @@ -32,15 +33,19 @@ and used with the -T option.

== BUGS:

If you found a bug, please report it at the RDoc project's tracker on
RubyForge:
RDoc's Fortran 95 support is pretty broken right now.
The rdoc-f95[http://www.gfd-dennou.org/library/dcmodel/rdoc-f95/] project has
patches for RDoc 1.x that provide excellent Fortran 95 support. Properly
supporting Fortran 95 requires a rewrite of RDoc's markup engine, which
is high on our list of goals. The Fortran 95 issue can be tracked
here[http://rubyforge.org/tracker/index.php?func=detail&aid=21542&group_id=627&atid=2475].

http://rubyforge.org/tracker/?group_id=627
If you find a bug, please report it at the RDoc project's
tracker[http://rubyforge.org/tracker/?group_id=627] on RubyForge:

== LICENSE:

RDoc is Copyright (c) 2001-2003 Dave Thomas, The Pragmatic Programmers,
portions (c) 2007-2008 Eric Hodel. It is free software, and may be
redistributed under the terms specified in the README file of the Ruby
distribution.

11 changes: 10 additions & 1 deletion lib/rdoc/markup/to_html_crossref.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ class RDoc::Markup::ToHtmlCrossref < RDoc::Markup::ToHtml
# apparently is allowed for Fortran 95, but I also think that this
# is a good idea for Ruby, as it is very reasonable to want to
# reference a call with arguments).
CLASS_REGEXP_STR = '\\\\?((?:\:{2})?[A-Za-z]\w*(?:\:\:\w+)*)'
#
# NOTE: In order to support Fortran 95 properly, the [A-Z] below
# should be changed to [A-Za-z]. This slows down rdoc significantly,
# however, and the Fortran 95 support is broken in any case due to
# the return in handle_special_CROSSREF if the token consists
# entirely of lowercase letters.
#
# The markup/cross-referencing engine needs a rewrite for
# Fortran 95 to be supported properly.
CLASS_REGEXP_STR = '\\\\?((?:\:{2})?[A-Z]\w*(?:\:\:\w+)*)'
METHOD_REGEXP_STR = '(\w+[!?=]?)(?:\([\.\w+\*\/\+\-\=\<\>]*\))?'

# Regular expressions matching text that should potentially have
Expand Down

0 comments on commit 7cd5177

Please sign in to comment.