Skip to content
Snippets Groups Projects
Commit edd9f229 authored by duncan.coutts@worc.ox.ac.uk's avatar duncan.coutts@worc.ox.ac.uk
Browse files

Extend URL variable expansion syntax and add source links to the contents page

Like the wiki link on the contents and index page, add a source code link too.
Extend the wiki & source URL variable expansion syntax.

The original syntax was:
%F for the source file name (the .hs version only, not the .lhs or .hs.pp one)
%M for the module name (with '.' replaced by '/')

The new syntax is:
%F or %{FILE} for the original source file name
%M or %{MODULE} for the module name (no replacements)
%N or %{NAME} for the function/type export name
%K or %{KIND} for a type/value flag "t" or "v"

with these extensions:
%{MODULE/./c} to replace the '.' module seperator with any other char c

%{VAR|some text with the % char in it} which means if the VAR is not in use in
this URL context then "" else replace the given text with the '%' char
replaced by the string value of the VAR. This extension allows us to construct
URLs wit optional parts, since the module/file name is not available for the
URL in the contents/index pages and the value/type name is not available for
the URL at the top level of each module.
parent 43bb89fa
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment