Fossil

Check-in [7ca773bc]
Login

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

Overview
Comment:A wiki-style hyperlink to a well-formed ISO8601 date-time will link to the timeline at that date and time.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7ca773bc312f914225553fe58451fbfe5f55a361
User & Date: drh 2010-02-27 12:26:03
Context
2010-03-01
00:54
Update the how-to-build documentation in the BUILD.txt file at the root of the source tree. check-in: 355d37ca user: drh tags: trunk
2010-02-28
07:01
added make wrapper script check-in: 0ddd305a user: ron tags: ron-make
2010-02-27
12:26
A wiki-style hyperlink to a well-formed ISO8601 date-time will link to the timeline at that date and time. check-in: 7ca773bc user: drh tags: trunk
2010-02-26
13:09
Update SQLite to pre-3.6.23. check-in: 1efd09ed user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/wikiformat.c.

956
957
958
959
960
961
962


963
964
965
966
967
968
969
....
1013
1014
1015
1016
1017
1018
1019



1020
1021
1022
1023
1024
1025
1026
**    [./relpath]
**
**    [WikiPageName]
**
**    [0123456789abcdef]
**
**    [#fragment]


*/
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[] */
){
................................................................................
        }else{
          zTerm = "";
        }
      }
    }else if( g.okHistory ){
      blob_appendf(p->pOut, "<a href=\"%s/info/%s\">", g.zBaseURL, zTarget);
    }



  }else if( wiki_name_is_wellformed((const unsigned char *)zTarget) ){
    blob_appendf(p->pOut, "<a href=\"%s/wiki?name=%T\">", g.zBaseURL, zTarget);
  }else{
    blob_appendf(p->pOut, "[bad-link: %h]", zTarget);
    zTerm = "";
  }
  assert( strlen(zTerm)<nClose );







>
>







 







>
>
>







956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
....
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
**    [./relpath]
**
**    [WikiPageName]
**
**    [0123456789abcdef]
**
**    [#fragment]
**
**    [2010-02-27 07:13]
*/
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[] */
){
................................................................................
        }else{
          zTerm = "";
        }
      }
    }else if( g.okHistory ){
      blob_appendf(p->pOut, "<a href=\"%s/info/%s\">", g.zBaseURL, zTarget);
    }
  }else if( strlen(zTarget)>=10 && isdigit(zTarget[0]) && zTarget[4]=='-'
            && db_int(0, "SELECT datetime(%Q) NOT NULL", zTarget) ){
    blob_appendf(p->pOut, "<a href=\"%s/timeline?c=%T\">", g.zBaseURL, zTarget);
  }else if( wiki_name_is_wellformed((const unsigned char *)zTarget) ){
    blob_appendf(p->pOut, "<a href=\"%s/wiki?name=%T\">", g.zBaseURL, zTarget);
  }else{
    blob_appendf(p->pOut, "[bad-link: %h]", zTarget);
    zTerm = "";
  }
  assert( strlen(zTerm)<nClose );