OSDN Git Service

Strip the UTF-8 BOM from the title of all txt2tags output.
authorJames Teh <jamie@jantrid.net>
Tue, 8 Feb 2011 02:08:31 +0000 (12:08 +1000)
committerJames Teh <jamie@jantrid.net>
Tue, 8 Feb 2011 02:08:31 +0000 (12:08 +1000)
user_docs/global.t2tconf

index 0ba55bb..f47695b 100644 (file)
 %!PostProc(html): ^<H2>(.*)</H2>$ <H3>\1</H3>\r
 %!PostProc(html): ^<H1>(.*)</H1>$ <H2>\1</H2>\r
 \r
+% Some of our files contain the UTF-8 BOM.\r
+% txt2tags doesn't care about encodings internally,\r
+% so it will just include the BOM at the start of the title.\r
+% Therefore, strip the BOM from the title.\r
+%!PostProc(html): \<(TITLE|H1)\>\xef\xbb\xbf <\1>\r
+\r
 % Language neutral defines\r
 % We need to do this one as PostProc so it gets converted for the title.\r
 %!PostProc: NVDA_VERSION 2011.1\r