tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Qq should print straight quotes in -Thtml
@ 2019-12-09 11:12 Anthony J. Bentley
  2019-12-09 15:05 ` Ingo Schwarze
  0 siblings, 1 reply; 2+ messages in thread
From: Anthony J. Bentley @ 2019-12-09 11:12 UTC (permalink / raw)
  To: tech

Hi,

According to mdoc(7):

     Qq, Qo, Qc       enclose in typewriter double quotes: "text"

Indeed, mdoc_term.c intentionally uses straight quotes:

        case MDOC_Qo:
        case MDOC_Qq:
                term_word(p, "\"");
                break;

mdoc_html.c uses curly quotes, but it should match mdoc_term.c.

ok?

Index: mdoc_html.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/mdoc_html.c,v
retrieving revision 1.206
diff -u -p -r1.206 mdoc_html.c
--- mdoc_html.c	15 Sep 2019 00:08:46 -0000	1.206
+++ mdoc_html.c	8 Dec 2019 19:47:24 -0000
@@ -1717,9 +1717,11 @@ mdoc_quote_pre(MDOC_ARGS)
 		break;
 	case MDOC_Do:
 	case MDOC_Dq:
+		print_text(h, "\\(lq");
+		break;
 	case MDOC_Qo:
 	case MDOC_Qq:
-		print_text(h, "\\(lq");
+		print_text(h, "\"");
 		break;
 	case MDOC_Po:
 	case MDOC_Pq:
@@ -1775,11 +1777,13 @@ mdoc_quote_post(MDOC_ARGS)
 		else
 			print_text(h, n->norm->Es->child->next->string);
 		break;
-	case MDOC_Qo:
-	case MDOC_Qq:
 	case MDOC_Do:
 	case MDOC_Dq:
 		print_text(h, "\\(rq");
+		break;
+	case MDOC_Qo:
+	case MDOC_Qq:
+		print_text(h, "\"");
 		break;
 	case MDOC_Po:
 	case MDOC_Pq:
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Qq should print straight quotes in -Thtml
  2019-12-09 11:12 Qq should print straight quotes in -Thtml Anthony J. Bentley
@ 2019-12-09 15:05 ` Ingo Schwarze
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Schwarze @ 2019-12-09 15:05 UTC (permalink / raw)
  To: Anthony J. Bentley; +Cc: tech

Hi Anthony,

Anthony J. Bentley wrote on Mon, Dec 09, 2019 at 04:12:39AM -0700:

> According to mdoc(7):
> 
>      Qq, Qo, Qc       enclose in typewriter double quotes: "text"
> 
> Indeed, mdoc_term.c intentionally uses straight quotes:
> 
>         case MDOC_Qo:
>         case MDOC_Qq:
>                 term_word(p, "\"");
>                 break;
> 
> mdoc_html.c uses curly quotes, but it should match mdoc_term.c.

Thanks for catching this bug!

> ok?

Yes, please commit.
  Ingo


> Index: mdoc_html.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/mandoc/mdoc_html.c,v
> retrieving revision 1.206
> diff -u -p -r1.206 mdoc_html.c
> --- mdoc_html.c	15 Sep 2019 00:08:46 -0000	1.206
> +++ mdoc_html.c	8 Dec 2019 19:47:24 -0000
> @@ -1717,9 +1717,11 @@ mdoc_quote_pre(MDOC_ARGS)
>  		break;
>  	case MDOC_Do:
>  	case MDOC_Dq:
> +		print_text(h, "\\(lq");
> +		break;
>  	case MDOC_Qo:
>  	case MDOC_Qq:
> -		print_text(h, "\\(lq");
> +		print_text(h, "\"");
>  		break;
>  	case MDOC_Po:
>  	case MDOC_Pq:
> @@ -1775,11 +1777,13 @@ mdoc_quote_post(MDOC_ARGS)
>  		else
>  			print_text(h, n->norm->Es->child->next->string);
>  		break;
> -	case MDOC_Qo:
> -	case MDOC_Qq:
>  	case MDOC_Do:
>  	case MDOC_Dq:
>  		print_text(h, "\\(rq");
> +		break;
> +	case MDOC_Qo:
> +	case MDOC_Qq:
> +		print_text(h, "\"");
>  		break;
>  	case MDOC_Po:
>  	case MDOC_Pq:
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-09 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 11:12 Qq should print straight quotes in -Thtml Anthony J. Bentley
2019-12-09 15:05 ` Ingo Schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).