Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Use the new WIKI_LINKSONLY rendering option for check-in comments on the timeline when the "plain text comments" option is enabled. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
05a53dc06f2d87fbd3449546d44ec4f4 |
| User & Date: | drh 2012-11-22 14:03:53.334 |
Context
|
2012-11-22
| ||
| 23:35 | Be consistent about display of check-in comments as either text/plain or text/x-fossil-wiki. When the user configures text/plain, use that format everywhere. ... (check-in: 2c6fa9c3b0 user: drh tags: trunk) | |
| 14:03 | Use the new WIKI_LINKSONLY rendering option for check-in comments on the timeline when the "plain text comments" option is enabled. ... (check-in: 05a53dc06f user: drh tags: trunk) | |
| 12:16 | Improved help message for the unsupported test-content-put command. ... (check-in: a191d8fb76 user: drh tags: trunk) | |
Changes
Changes to src/timeline.c.
| ︙ | ︙ | |||
191 192 193 194 195 196 197 |
Stmt *pQuery, /* Query to implement the timeline */
int tmFlags, /* Flags controlling display behavior */
const char *zThisUser, /* Suppress links to this user */
const char *zThisTag, /* Suppress links to this tag */
void (*xExtra)(int) /* Routine to call on each line of display */
){
int wikiFlags;
| < < > > > | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
Stmt *pQuery, /* Query to implement the timeline */
int tmFlags, /* Flags controlling display behavior */
const char *zThisUser, /* Suppress links to this user */
const char *zThisTag, /* Suppress links to this tag */
void (*xExtra)(int) /* Routine to call on each line of display */
){
int wikiFlags;
int mxWikiLen;
Blob comment;
int prevTagid = 0;
int suppressCnt = 0;
char zPrevDate[20];
GraphContext *pGraph = 0;
int prevWasDivider = 0; /* True if previous output row was <hr> */
int fchngQueryInit = 0; /* True if fchngQuery is initialized */
Stmt fchngQuery; /* Query for file changes on check-ins */
static Stmt qbranch;
int pendingEndTr = 0; /* True if a </td></tr> is needed */
zPrevDate[0] = 0;
mxWikiLen = db_get_int("timeline-max-comment", 0);
if( db_get_boolean("timeline-block-markup", 0) ){
wikiFlags = WIKI_INLINE | WIKI_NOBADLINKS;
}else{
wikiFlags = WIKI_INLINE | WIKI_NOBLOCK | WIKI_NOBADLINKS;
}
if( db_get_boolean("timeline-plaintext", 0) ){
wikiFlags |= WIKI_LINKSONLY;
}
if( tmFlags & TIMELINE_GRAPH ){
pGraph = graph_init();
/* style is not moved to css, because this is
** a technical div for the timeline graph
*/
@ <div id="canvas" style="position:relative;width:1px;height:1px;"></div>
|
| ︙ | ︙ | |||
355 356 357 358 359 360 361 |
}
db_column_blob(pQuery, commentColumn, &comment);
if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
Blob truncated;
blob_zero(&truncated);
blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
blob_append(&truncated, "...", 3);
| < < < | < < < | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
}
db_column_blob(pQuery, commentColumn, &comment);
if( mxWikiLen>0 && blob_size(&comment)>mxWikiLen ){
Blob truncated;
blob_zero(&truncated);
blob_append(&truncated, blob_buffer(&comment), mxWikiLen);
blob_append(&truncated, "...", 3);
wiki_convert(&truncated, 0, wikiFlags);
blob_reset(&truncated);
}else{
wiki_convert(&comment, 0, wikiFlags);
}
blob_reset(&comment);
/* Generate the "user: USERNAME" at the end of the comment, together
** with a hyperlink to another timeline for that user.
|
| ︙ | ︙ |
Changes to src/wikiformat.c.
| ︙ | ︙ | |||
1633 1634 1635 1636 1637 1638 1639 |
if( pOut ){
renderer.pOut = pOut;
}else{
renderer.pOut = cgi_output_blob();
}
blob_strip_bom(pIn, 0);
| < < | 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 |
if( pOut ){
renderer.pOut = pOut;
}else{
renderer.pOut = cgi_output_blob();
}
blob_strip_bom(pIn, 0);
wiki_render(&renderer, blob_str(pIn));
endAutoParagraph(&renderer);
while( renderer.nStack ){
popStack(&renderer);
}
blob_append(renderer.pOut, "\n", 1);
free(renderer.aStack);
}
/*
** COMMAND: test-wiki-render
**
|
| ︙ | ︙ |