mirror of
https://git.zx2c4.com/cgit
synced 2025-08-30 14:39:34 +02:00
Only show first 80 characters of commit subject in log and summary
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
378cae6398
commit
9d8d9b6123
5 changed files with 34 additions and 5 deletions
28
html.c
28
html.c
|
@ -65,6 +65,34 @@ void html_txt(char *txt)
|
|||
html(txt);
|
||||
}
|
||||
|
||||
void html_ntxt(int len, char *txt)
|
||||
{
|
||||
char *t = txt;
|
||||
while(*t && len--){
|
||||
int c = *t;
|
||||
if (c=='<' || c=='>' || c=='&') {
|
||||
*t = '\0';
|
||||
html(txt);
|
||||
*t = c;
|
||||
if (c=='>')
|
||||
html(">");
|
||||
else if (c=='<')
|
||||
html("<");
|
||||
else if (c=='&')
|
||||
html("&");
|
||||
txt = t+1;
|
||||
}
|
||||
t++;
|
||||
}
|
||||
if (t!=txt) {
|
||||
char c = *t;
|
||||
*t = '\0';
|
||||
html(txt);
|
||||
*t = c;
|
||||
}
|
||||
if (len<0)
|
||||
html("...");
|
||||
}
|
||||
|
||||
void html_attr(char *txt)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue