I have been in the process of rewriting bidi package in dtx (usind ltxdoc with hypdoc package) source and it appears that fontspec has a bug. As soon as I add the fontspec package and run xelatex twice on bidi.dtx, I get this error:
! LaTeX Error: Text for \verb command ended by end of line. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.6 ...clindex{5279}{}{58}, \hdclindex{5293}{}{72} ? bidi.dtx can be found at https://bitbucket.org/vafa/bidi/downloads Has anyone else experienced this? -- به نام خداوند جان و خرد کزین برتر اندیشه برنگذرد
-------------------------------------------------- Subscriptions, Archive, and List information, etc.: http://tug.org/mailman/listinfo/xetex