On Oct 21, 2010, at 6:35 AM, David Maus wrote:

At Thu, 30 Sep 2010 15:17:00 -0500,
Cook, Malcolm wrote:


If find that this orgtext

        [[http://www.foo.com/foo?URL=http://www.bar.com][test]]

exports to html incorrectly as

[[http://www.foo.com/foo?URL=[[http://www.bar.com][test][http://www.bar.com ][test]]]

using today's fresh git pull make install

Any pointers?

The problem here is that Org's (legacy) support for plain links
(i.e. without square brackets) kicks in and transforms the fragment
part to a normal square bracket link.

My regexp-foo is not as it should be, but I am on this one to fix it;
What we need to express in `org-export-normalize-link' is, that a
plain link is something that looks like a hyperlink but not preceded
directly by a square or angle bracket and not after a question mark
followed by zero or more no-whitespace-characters.

This is a bit hard without lookbehind assertions as they are available
in perl.  For something like this it is somtimes easier to just to
the normal match you wanted to use anyway and then confirm by
taking a separate look at the text before the match
which is, for example,

  (buffer-substring (point-at-bol) (match-beginning 0))

HTH

- Carsten


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to