Fossil SCM

Accept wiki hyperlinks of the form: <nowiki>[#label]</wiki> Ticket [ab82a0bd213b]

drh 2009-09-19 15:14 trunk
Commit 3a4c7f60a27f32db9bc7ee7ab5d3ab23a52e45d5
1 file changed +16 -1
+16 -1
--- src/wikiformat.c
+++ src/wikiformat.c
@@ -917,10 +917,25 @@
917917
** close the markup.
918918
**
919919
** Actually, this routine might or might not append the hyperlink, depending
920920
** on current rendering rules: specifically does the current user have
921921
** "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]
922937
*/
923938
static void openHyperlink(
924939
Renderer *p, /* Rendering context */
925940
const char *zTarget, /* Hyperlink traget; text within [...] */
926941
char *zClose, /* Write hyperlink closing text here */
@@ -939,11 +954,11 @@
939954
if( 1 /* g.okHistory */ ){
940955
blob_appendf(p->pOut, "<a href=\"%s%h\">", g.zBaseURL, zTarget);
941956
}else{
942957
zTerm = "";
943958
}
944
- }else if( zTarget[0]=='.' ){
959
+ }else if( zTarget[0]=='.' || zTarget[0]=='#' ){
945960
if( 1 /* g.okHistory */ ){
946961
blob_appendf(p->pOut, "<a href=\"%h\">", zTarget);
947962
}else{
948963
zTerm = "";
949964
}
950965
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button