diff options
author | John Ankarström <john@ankarstrom.se> | 2022-06-10 18:07:02 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-06-10 18:07:02 +0200 |
commit | d8ab4168b1dc4e56c51c17a5c68c34df3014aeec (patch) | |
tree | 53a9b7339f1c13fd050d965dfd73ac39a0d7790d | |
parent | 392fc74a77b94cc78e9bfe349dcdfa0ab8fc8f5c (diff) | |
download | lightroff-d8ab4168b1dc4e56c51c17a5c68c34df3014aeec.tar.gz |
Support XML-style comments.
-rw-r--r-- | xroff.lex | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -10,6 +10,7 @@ \\ BEGIN(ESC); \n BEGIN(NEW); \<!\[ BEGIN(RAW); +\<!--.*--> /* Ignore comment. */ ^< printf("."); BEGIN(REQ); /* Beginning of file. */ \< printf("\\c\n."); BEGIN(REQ); . ECHO; @@ -18,7 +19,8 @@ <NEW>\n /* Ignore consecutive newlines. */ <NEW>\\ printf("\n"); BEGIN(ESC); -<NEW>\<!\[\n? printf("\n"); BEGIN(RAW); +<NEW><!\[\n? printf("\n"); BEGIN(RAW); +<NEW><!--.*--> /* Ignore comment. */ <NEW>< printf("\n."); BEGIN(REQ); <NEW>\. printf("\n\\&."); BEGIN(0); <NEW>. printf("\n"); BEGIN(0); REJECT; |