From: Nicolas Goaziou <n.goaziou@gmail.com>
To: James Harkins <jamshark70@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: HTML export doesn't convert quote before footnote
Date: Wed, 08 Jan 2014 16:33:56 +0100 [thread overview]
Message-ID: <87lhyqbi8r.fsf@gmail.com> (raw)
In-Reply-To: <2dca3d53-10f1-4ead-8106-eb5fe050a656@dewdrop-world.net> (James Harkins's message of "Wed, 08 Jan 2014 10:09:07 +0800")
Hello,
James Harkins <jamshark70@gmail.com> writes:
> This appears to be an HTML export bug: A straight double-quote mark
> before a footnote fails to convert into ”
>
> Minimal example:
>
> * Heading
> Krusty the Klown opined, "Well, that's showbiz for ya."[fn:1]
> * Footnotes
> [fn:1] /The Simpsons/.
>
> Expected:
>
> <p>
> Krusty the Klown opined, “Well, that’s showbiz for
> ya.”<sup><a id="fnr.1" name="fnr.1" class="footref"
> href="#fn.1">1</a></sup>
> </p>
>
> Got:
>
> <p>
> Krusty the Klown opined, “Well, that’s showbiz for
> ya."<sup><a id="fnr.1" name="fnr.1" class="footref"
> href="#fn.1">1</a></sup>
> </p>
>
> I guess I can filter for it as a workaround.
Smart quotes mechanism is based on regexps. There are unavoidable
ambiguous cases, like this one. We can pile up new rules to handle most
of them, but in the end, I don't think we cannot handle them all. Worse,
some advanced rules may create false positives.
Anyway, here are some options :
1. Do nothing.
2. Change the closing regexp to
"\\(?:\\w\\|\\s.\\|\\s_\\)\\([\"']\\)", i.e. ignore characters
after the quote. But then we have to find a way to know a closing
single quote from an apostrophe.
3. Do not rely on regexps but on some simple depth rules:
1. At a given level in the parse tree, the first quote is always an
opening quote ;
2. Every subsequent quote in the level alternates between closing
and opening state.
Second option probably has its shortcomings too, but it may be sturdier.
It also doesn't solve the problem of apostrophes.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2014-01-08 15:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 2:09 HTML export doesn't convert quote before footnote James Harkins
2014-01-08 5:03 ` Nick Dokos
2014-01-08 15:33 ` Nicolas Goaziou [this message]
2014-01-08 15:50 ` James Harkins
2014-01-08 16:37 ` Nicolas Goaziou
2014-01-09 2:13 ` James Harkins
2014-01-09 3:03 ` James Harkins
2014-01-09 11:07 ` Nicolas Goaziou
2014-01-11 2:45 ` James Harkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lhyqbi8r.fsf@gmail.com \
--to=n.goaziou@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jamshark70@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).