Looking at src/pandoc.hs, we have:

| htmlFormat && ascii ->
writerFn outputFile =<< selfcontain (toEntities result)

So it tries to do the right thing in that situation. result contains the
standalone html string and toEntities substitutes entities for non-ascii
characters. The problem is selfcontain once again parses the html
string, so the entities get resolved to characters once more, and then
this is written out. I flipped it around so that we have:

| htmlFormat && ascii -> do
result' <- selfcontain result
writerFn outputFile =<< return (toEntities result')

which seems to fix the issue. I'll report this upstream and see if we
can get it fixed.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1024754

Title:
  pandoc --ascii and --self-contained conflict

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pandoc/+bug/1024754/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to