On 12/08/10 16:37, Suraj Kurapati wrote:
On Wed, Aug 11, 2010 at 9:19 PM, Suraj Kurapati<[email protected]> wrote:
asciidoc: WARNING: man.txt: line 794: no output from filter:
source-highlight -f xhtml -s rhtml
In such a case, I think that AsciiDoc should emit the original input
that was fed to source-highlight instead of emitting the output of
source-highlight (which is empty due to the failure).
Below is a naive patch to implement this idea. However, it does not
seem to work correctly because the original input lacks<tt> tags
whereas source-highlight output (or AsciiDoc processing thereof) is
contained in<tt> tags.
Yes, the reason an empty string is returned is that the tag that enclosing a
filter block assumes valid output markup, the filter input block, in addition to
not displaying correctly, could result in invalid output markup.
Cheers, Stuart
diff -r eef6876f313e asciidoc.py
--- a/asciidoc.py Thu Aug 12 14:15:30 2010 +1200
+++ b/asciidoc.py Wed Aug 11 21:30:40 2010 -0700
@@ -686,6 +686,7 @@
(filter_cmd, filter_status))
if lines and not result:
message.warning('no output from filter: %s' % filter_cmd)
+ return lines # The filter failed, so output its input instead.
return result
def system(name, args, is_macro=False, attrs=None):
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.