Mercurial > hg > octave-lyh
changeset 17414:3611ebb0ad88
doc: Add operator and keyword docstrings missing from lookfor cache.
* doc/interpreter/mk_doc_cache.m: Append operator and keyword docstrings to
file containing function docstrings before passing through makeinfo.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 10 Sep 2013 22:00:19 -0700 |
parents | 3f0ed69d21c6 |
children | a5de727e3795 |
files | doc/interpreter/mk_doc_cache.m |
diffstat | 1 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/mk_doc_cache.m +++ b/doc/interpreter/mk_doc_cache.m @@ -48,10 +48,22 @@ endif endif endfor -text = [text{:}, doc_delim]; +text = [text{:}]; + +## Strip Texinfo marker +text = regexprep (text, "-\\*- texinfo -\\*-[ \t]*[\r\n]*", ""); -## Strip Texinfo markers and docstring separators. -text = regexprep (text, "-\\*- texinfo -\\*-[ \t]*[\r\n]*", ""); +## Add keywords and operators +other_docstrings = [__keywords__; __operators__]; +for i = 1 : numel (other_docstrings) + name = other_docstrings{i}; + ## Special handling of block comment operators such as '#{' + esc_name = regexprep (name, '([{}])', '@$1'); + text = [text doc_delim esc_name get_help_text(name) "\n"]; +endfor +text(end+1) = doc_delim; + +## Double '@' symbol for Texinfo text = strrep (text, [doc_delim "@"], [doc_delim "@@"]); ## Write data to temporary file for input to makeinfo