version 1.153, 2014/01/05 19:10:56 |
version 1.155, 2014/03/23 11:25:26 |
|
|
/* $Id$ */ |
/* $Id$ */ |
/* |
/* |
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org> |
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
|
|
#include <unistd.h> |
#include <unistd.h> |
|
|
#include "mandoc.h" |
#include "mandoc.h" |
|
#include "mandoc_aux.h" |
#include "libmandoc.h" |
#include "libmandoc.h" |
#include "out.h" |
#include "out.h" |
#include "html.h" |
#include "html.h" |
Line 331 print_encode(struct html *h, const char *p, int norecu |
|
Line 332 print_encode(struct html *h, const char *p, int norecu |
|
int c, len, nospace; |
int c, len, nospace; |
const char *seq; |
const char *seq; |
enum mandoc_esc esc; |
enum mandoc_esc esc; |
static const char rejs[6] = { '\\', '<', '>', '&', ASCII_HYPH, '\0' }; |
static const char rejs[8] = { '\\', '<', '>', '&', |
|
ASCII_NBRSP, ASCII_HYPH, ASCII_BREAK, '\0' }; |
|
|
nospace = 0; |
nospace = 0; |
|
|
Line 360 print_encode(struct html *h, const char *p, int norecu |
|
Line 362 print_encode(struct html *h, const char *p, int norecu |
|
case ('&'): |
case ('&'): |
printf("&"); |
printf("&"); |
continue; |
continue; |
|
case (ASCII_NBRSP): |
|
putchar('-'); |
|
continue; |
case (ASCII_HYPH): |
case (ASCII_HYPH): |
putchar('-'); |
putchar('-'); |
|
/* FALLTHROUGH */ |
|
case (ASCII_BREAK): |
continue; |
continue; |
default: |
default: |
break; |
break; |