# HG changeset patch # User Rik # Date 1285407241 25200 # Node ID a2773763e3ffc48938bf7e8a3ce266933ec5d2b0 # Parent 630dc1933fe60284a54a423b51e150cc5c3f7d17 Remove requirement for PCRE to build doc-cache. diff --git a/doc/ChangeLog b/doc/ChangeLog --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,10 +1,16 @@ +2010-08-15 Rik + + * interpreter/mk_doc_cache.m: Remove requirement for PCRE to build + doc cache. Correctly parse first sentence from docstrings with + multiple @deftypefn lines. + 2010-09-15 John W. Eaton * interpreter/Makefile.am (EXTRA_DIST): Add images.awk to the list. 2010-08-15 Rik - * interpreter/matrx.txi: Add documentation for randi function. + * interpreter/matrix.txi: Add documentation for randi function. 2010-08-13 Rik diff --git a/doc/interpreter/mk_doc_cache.m b/doc/interpreter/mk_doc_cache.m --- a/doc/interpreter/mk_doc_cache.m +++ b/doc/interpreter/mk_doc_cache.m @@ -45,8 +45,8 @@ text = [text{:}, doc_delim]; ## Modify Octave-specific macros before passing to makeinfo -text = regexprep (text, "@seealso *{([^}]*)}", "See also: $1."); -text = regexprep (text, "@nospell *{([^}]*)}", "$1"); +text = regexprep (text, "@seealso *\\{([^}]*)\\}", "See also: $1."); +text = regexprep (text, "@nospell *\\{([^}]*)\\}", "$1"); text = regexprep (text, "-\\*- texinfo -\\*-[ \t]*[\r\n]*", ""); text = regexprep (text, "@", "@@"); @@ -97,15 +97,20 @@ continue; endif - [s, e] = regexp (doc, "^ -- [^\r\n]*[\r\n]", "lineanchors"); + tmp = doc; + found = 0; + do + [s, e] = regexp (tmp, "^ -- [^\r\n]*[\r\n]"); + if (! isempty(s)) + found = 1; + tmp = tmp(e+1:end); + endif + until (isempty (s)) - if (isempty (s)) + if (! found) continue; endif - start_of_first_sentence = e(end); - - tmp = doc(start_of_first_sentence:end); end_of_first_sentence = regexp (tmp, '(\.|[\r\n][\r\n])', "once"); if (isempty (end_of_first_sentence)) end_of_first_sentence = length (tmp);