Mercurial > octave
changeset 23317:ef94844a3c12
* publish.m: Refer to the online manual of the current Octave version.
* scripts/general/publish.m: When parsing links like <octave:foo txt> translate
to a URL to the online manual of the current octave release. In case of the
delvelopment version, keep referring to the latest manual via "interpreter".
author | Kai T. Ohlhus <k.ohlhus@gmail.com> |
---|---|
date | Mon, 20 Mar 2017 20:48:02 +0100 |
parents | c9e68e3a9e15 |
children | d05f688ae836 |
files | scripts/general/publish.m |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/general/publish.m Mon Mar 20 09:40:51 2017 -0700 +++ b/scripts/general/publish.m Mon Mar 20 20:48:02 2017 +0100 @@ -855,8 +855,13 @@ ## Links "<octave:Function TEXT>" idx = strfind (cstr{j}, " "); url = cstr{j}; - url = ["https://www.gnu.org/software/octave/doc/interpreter/", ... - "XREF", texinfo_esc(url(9:idx-1)), ".html"]; + url = texinfo_esc(url(9:idx-1)); + v = version (); + if (v(end) == '+') + v = "interpreter"; + endif + url = sprintf ( ... + "https://www.gnu.org/software/octave/doc/%s/XREF%s.html", v, url); txt = cstr{j}; txt = format_text (txt(idx+1:end-1), formatter); cstr{j} = formatter ("link", url, txt);