Differences From:
File
src/wikiformat.c
part of check-in
[e75f9a2ab4]
- Fixes to the rendering of <verbatim> and <nowiki>
by
drh on
2007-10-28 21:09:32.
[view]
To:
File
src/wikiformat.c
part of check-in
[f394d84560]
- Update SQLite to the latest build from CVS. Add in the FTS3 extension,
though it is not yet being used. Additional work toward tickets.
by
drh on
2007-11-25 16:13:52.
[view]
@@ -770,8 +770,20 @@
}
}
/*
+** If the input string corresponds to an existing baseline,
+** return true.
+*/
+static int is_valid_uuid(const char *z){
+ int n = strlen(z);
+ int rid;
+ if( n<4 || n>UUID_SIZE ) return 0;
+ if( !validate16(z, n) ) return 0;
+ return 1;
+}
+
+/*
** Resolve a hyperlink. The argument is the content of the [...]
** in the wiki. Append the URL to the output of the Renderer.
*/
static void resolveHyperlink(const char *zTarget, Renderer *p){
@@ -782,8 +794,10 @@
){
blob_appendf(p->pOut, zTarget);
}else if( zTarget[0]=='/' ){
blob_appendf(p->pOut, "%s%h", g.zBaseURL, zTarget);
+ }else if( is_valid_uuid(zTarget) ){
+ blob_appendf(p->pOut, "%s/info/%s", g.zBaseURL, zTarget);
}else if( wiki_name_is_wellformed(zTarget) ){
blob_appendf(p->pOut, "%s/wiki?name=%T", g.zBaseURL, zTarget);
}else{
blob_appendf(p->pOut, "error");