swish/commit
Take care of http prefix by using http_link_to_id/3 when rendering gitty file links
author | Jacco van Ossenbruggen |
---|---|
Tue Nov 14 10:37:26 2017 +0100 | |
committer | Jacco van Ossenbruggen |
Tue Nov 14 10:37:26 2017 +0100 | |
commit | 18401e46d158cfaf8a92189c540eac5da0cfa6fc |
tree | 75f3a82d08896b06b2866a313466f9665dca1072 |
parent | 11f236c0afe11b45684adec6f0dba3298eb0adcd |
Diff style: patch stat
diff --git a/lib/swish/render/swish.pl b/lib/swish/render/swish.pl index a641a42..63949b8 100644 --- a/lib/swish/render/swish.pl +++ b/lib/swish/render/swish.pl @@ -36,6 +36,7 @@ [ term_rendering//3 % +Term, +Vars, +Options ]). :- use_module(library(http/html_write)). +:- use_module(library(http/http_dispatch)). :- use_module('../render'). :- use_module('../storage'). @@ -54,9 +55,10 @@ term_rendering(File, _Vars, _Options) --> { atom(File), file_name_extension(_, Ext, File), swish_extension(Ext), - storage_file(File) + storage_file(File), + http_link_to_id(web_storage, path_postfix(File), HREF) }, - html(a([class(store),href('/p/'+File)], File)). + html(a([class(store),href(HREF)], File)). swish_extension(pl). swish_extension(swinb).