diff options
author | Adam Chlipala <adam@chlipala.net> | 2020-01-15 12:12:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-15 12:12:32 -0500 |
commit | 026883de8a8c80a1dc5fa3e51a95e951db4b2b6a (patch) | |
tree | cf4b600a783fb5bc87f83b98ffaed589aecae145 /src/c/urweb.c | |
parent | 5cce43a484bdde0053820b8ae408bcba830b25ba (diff) | |
parent | eb86dffeeec897d17905f3adff84e6acfd018330 (diff) |
Merge pull request #136 from dredozubov/anchor-links
Same page link anchors
Diffstat (limited to 'src/c/urweb.c')
-rw-r--r-- | src/c/urweb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index 8ffe7dd3..0db5fc80 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -4638,6 +4638,10 @@ uw_Basis_string uw_Basis_currentUrl(uw_context ctx) { return ctx->current_url; } +uw_Basis_string uw_Basis_anchorUrl(uw_context ctx, uw_Basis_string s) { + return uw_Basis_strcat(ctx, uw_Basis_strcat(ctx, ctx->current_url, "#"), s); +} + void uw_set_currentUrl(uw_context ctx, char *s) { ctx->current_url = s; } |