org-element: Only allow plain links in links
commit7cd6fdcd34469544099d4fdc29bbaa14fc650e54
authorNicolas Goaziou <n.goaziou@gmail.com>
Mon, 25 Feb 2013 20:32:15 +0000 (25 21:32 +0100)
committerNicolas Goaziou <n.goaziou@gmail.com>
Mon, 25 Feb 2013 21:16:01 +0000 (25 22:16 +0100)
tree5dcfc6bfa7ceb1e312f4d2b47430749797cc802c
parent11033a97dc340db7c38c68f2e78dd78230bd7b1c
org-element: Only allow plain links in links

* lisp/org-element.el (org-element-all-successors): Add `plain-link'
  successor.
(org-element-object-restrictions): Remove `link' within `link'.  Allow
`plain-link' instead.
(org-element-plain-link-successor): New function.
* testing/lisp/test-org-element.el: Add test.

Plain links within links are needed for the following kind of syntax:

  [[http://orgmode.org][file:unicorn.png]]

No other link type is allowed within links.
lisp/org-element.el
testing/lisp/test-org-element.el