Fossil SCM
Accept wiki hyperlinks of the form: <nowiki>[#label]</wiki> Ticket [ab82a0bd213b]
Commit
3a4c7f60a27f32db9bc7ee7ab5d3ab23a52e45d5
Parent
849972ea0b9d2ad…
1 file changed
+16
-1
+16
-1
| --- src/wikiformat.c | ||
| +++ src/wikiformat.c | ||
| @@ -917,10 +917,25 @@ | ||
| 917 | 917 | ** close the markup. |
| 918 | 918 | ** |
| 919 | 919 | ** Actually, this routine might or might not append the hyperlink, depending |
| 920 | 920 | ** on current rendering rules: specifically does the current user have |
| 921 | 921 | ** "History" permission. |
| 922 | +** | |
| 923 | +** [http://www.fossil-scm.org/] | |
| 924 | +** [https://www.fossil-scm.org/] | |
| 925 | +** [ftp://www.fossil-scm.org/] | |
| 926 | +** [mailto:[email protected]] | |
| 927 | +** | |
| 928 | +** [/path] | |
| 929 | +** | |
| 930 | +** [./relpath] | |
| 931 | +** | |
| 932 | +** [WikiPageName] | |
| 933 | +** | |
| 934 | +** [0123456789abcdef] | |
| 935 | +** | |
| 936 | +** [#fragment] | |
| 922 | 937 | */ |
| 923 | 938 | static void openHyperlink( |
| 924 | 939 | Renderer *p, /* Rendering context */ |
| 925 | 940 | const char *zTarget, /* Hyperlink traget; text within [...] */ |
| 926 | 941 | char *zClose, /* Write hyperlink closing text here */ |
| @@ -939,11 +954,11 @@ | ||
| 939 | 954 | if( 1 /* g.okHistory */ ){ |
| 940 | 955 | blob_appendf(p->pOut, "<a href=\"%s%h\">", g.zBaseURL, zTarget); |
| 941 | 956 | }else{ |
| 942 | 957 | zTerm = ""; |
| 943 | 958 | } |
| 944 | - }else if( zTarget[0]=='.' ){ | |
| 959 | + }else if( zTarget[0]=='.' || zTarget[0]=='#' ){ | |
| 945 | 960 | if( 1 /* g.okHistory */ ){ |
| 946 | 961 | blob_appendf(p->pOut, "<a href=\"%h\">", zTarget); |
| 947 | 962 | }else{ |
| 948 | 963 | zTerm = ""; |
| 949 | 964 | } |
| 950 | 965 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -917,10 +917,25 @@ | |
| 917 | ** close the markup. |
| 918 | ** |
| 919 | ** Actually, this routine might or might not append the hyperlink, depending |
| 920 | ** on current rendering rules: specifically does the current user have |
| 921 | ** "History" permission. |
| 922 | */ |
| 923 | static void openHyperlink( |
| 924 | Renderer *p, /* Rendering context */ |
| 925 | const char *zTarget, /* Hyperlink traget; text within [...] */ |
| 926 | char *zClose, /* Write hyperlink closing text here */ |
| @@ -939,11 +954,11 @@ | |
| 939 | if( 1 /* g.okHistory */ ){ |
| 940 | blob_appendf(p->pOut, "<a href=\"%s%h\">", g.zBaseURL, zTarget); |
| 941 | }else{ |
| 942 | zTerm = ""; |
| 943 | } |
| 944 | }else if( zTarget[0]=='.' ){ |
| 945 | if( 1 /* g.okHistory */ ){ |
| 946 | blob_appendf(p->pOut, "<a href=\"%h\">", zTarget); |
| 947 | }else{ |
| 948 | zTerm = ""; |
| 949 | } |
| 950 |
| --- src/wikiformat.c | |
| +++ src/wikiformat.c | |
| @@ -917,10 +917,25 @@ | |
| 917 | ** close the markup. |
| 918 | ** |
| 919 | ** Actually, this routine might or might not append the hyperlink, depending |
| 920 | ** on current rendering rules: specifically does the current user have |
| 921 | ** "History" permission. |
| 922 | ** |
| 923 | ** [http://www.fossil-scm.org/] |
| 924 | ** [https://www.fossil-scm.org/] |
| 925 | ** [ftp://www.fossil-scm.org/] |
| 926 | ** [mailto:[email protected]] |
| 927 | ** |
| 928 | ** [/path] |
| 929 | ** |
| 930 | ** [./relpath] |
| 931 | ** |
| 932 | ** [WikiPageName] |
| 933 | ** |
| 934 | ** [0123456789abcdef] |
| 935 | ** |
| 936 | ** [#fragment] |
| 937 | */ |
| 938 | static void openHyperlink( |
| 939 | Renderer *p, /* Rendering context */ |
| 940 | const char *zTarget, /* Hyperlink traget; text within [...] */ |
| 941 | char *zClose, /* Write hyperlink closing text here */ |
| @@ -939,11 +954,11 @@ | |
| 954 | if( 1 /* g.okHistory */ ){ |
| 955 | blob_appendf(p->pOut, "<a href=\"%s%h\">", g.zBaseURL, zTarget); |
| 956 | }else{ |
| 957 | zTerm = ""; |
| 958 | } |
| 959 | }else if( zTarget[0]=='.' || zTarget[0]=='#' ){ |
| 960 | if( 1 /* g.okHistory */ ){ |
| 961 | blob_appendf(p->pOut, "<a href=\"%h\">", zTarget); |
| 962 | }else{ |
| 963 | zTerm = ""; |
| 964 | } |
| 965 |