Fossil

Check-in [0039b781]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the ⟾ mark after external hyperlinks in wiki.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0039b7813ee728d25509c20d4f9f3df287719945
User & Date: drh 2009-11-01 19:49:34
Context
2009-11-02
13:19
Disable the external link marking as it does not work on windows. check-in: 980b160b user: drh tags: trunk
2009-11-01
19:49
Add the ⟾ mark after external hyperlinks in wiki. check-in: 0039b781 user: drh tags: trunk
19:25
Update to the latest version of SQLite (3.6.20rc1) and fix some compiler warnings. check-in: dffe11c2 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/wikiformat.c.

938
939
940
941
942
943
944
945
946
947
948
949
950
951
952

953
954
955
956
957
958
959
static void openHyperlink(
  Renderer *p,            /* Rendering context */
  const char *zTarget,    /* Hyperlink traget; text within [...] */
  char *zClose,           /* Write hyperlink closing text here */
  int nClose              /* Bytes available in zClose[] */
){
  const char *zTerm = "</a>";
  assert( nClose>10 );

  if( strncmp(zTarget, "http:", 5)==0 
   || strncmp(zTarget, "https:", 6)==0
   || strncmp(zTarget, "ftp:", 4)==0 
   || strncmp(zTarget, "mailto:", 7)==0
  ){
    blob_appendf(p->pOut, "<a href=\"%s\">", zTarget);

  }else if( zTarget[0]=='/' ){
    if( 1 /* g.okHistory */ ){
      blob_appendf(p->pOut, "<a href=\"%s%h\">", g.zBaseURL, zTarget);
    }else{
      zTerm = "";
    }
  }else if( zTarget[0]=='.' || zTarget[0]=='#' ){







|







>







938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
static void openHyperlink(
  Renderer *p,            /* Rendering context */
  const char *zTarget,    /* Hyperlink traget; text within [...] */
  char *zClose,           /* Write hyperlink closing text here */
  int nClose              /* Bytes available in zClose[] */
){
  const char *zTerm = "</a>";
  assert( nClose>=20 );

  if( strncmp(zTarget, "http:", 5)==0 
   || strncmp(zTarget, "https:", 6)==0
   || strncmp(zTarget, "ftp:", 4)==0 
   || strncmp(zTarget, "mailto:", 7)==0
  ){
    blob_appendf(p->pOut, "<a href=\"%s\">", zTarget);
    zTerm = "&#x27FE;</a>";
  }else if( zTarget[0]=='/' ){
    if( 1 /* g.okHistory */ ){
      blob_appendf(p->pOut, "<a href=\"%s%h\">", g.zBaseURL, zTarget);
    }else{
      zTerm = "";
    }
  }else if( zTarget[0]=='.' || zTarget[0]=='#' ){