summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Rackham <srackham@methods.co.nz>2010-08-12 09:12:05 +1200
committerStuart Rackham <srackham@methods.co.nz>2010-08-12 09:12:05 +1200
commitb4f2c1714b1bdaac706089283c43e08586fd8eff (patch)
treed0b7ab05e277930e57f5e1de3fd7ef75579e3f43
parent1a9cb727387f535fcafdc49e49957fa92c7a5948 (diff)
downloadasciidoc-b4f2c1714b1bdaac706089283c43e08586fd8eff.tar.gz
Relaxed anchor ID name syntax (see http://groups.google.com/group/asciidoc/browse_thread/thread/5f3e825c74ed30c).
-rw-r--r--CHANGELOG.txt2
-rw-r--r--asciidoc.conf6
-rw-r--r--doc/asciidoc.txt9
-rw-r--r--tests/data/testcases.txt5
4 files changed, 15 insertions, 7 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 59e76f5..0c1c2a2 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -6,6 +6,8 @@ AsciiDoc ChangeLog
Version 8.5.4 (2010-08-15)
--------------------------
.Additions and changes
+- Relaxed anchor ID name syntax
+ (http://groups.google.com/group/asciidoc/browse_thread/thread/5f3e825c74ed30c).
- Added document files: `doc/epub-notes.txt`,
`doc/publishing-ebooks-with-asciidoc.txt`.
- 'a2x': If all other resource locations are exhausted then recursively
diff --git a/asciidoc.conf b/asciidoc.conf
index acf940f..f882c95 100644
--- a/asciidoc.conf
+++ b/asciidoc.conf
@@ -194,11 +194,11 @@ CAUTION-style=template="admonitionparagraph",name="caution",caption="{caution-ca
(?su)[\\]?(?P<name>footnote|footnoteref):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
# Anchor: [[[id]]]. Bibliographic anchor.
-(?su)[\\]?\[\[\[(?P<attrlist>[\w][\w-]*?)\]\]\]=anchor3
+(?su)[\\]?\[\[\[(?P<attrlist>[\w_:][\w_:.-]*?)\]\]\]=anchor3
# Anchor: [[id,xreflabel]]
-(?su)[\\]?\[\[(?P<attrlist>[\w"].*?)\]\]=anchor2
+(?su)[\\]?\[\[(?P<attrlist>[\w"_:].*?)\]\]=anchor2
# Link: <<id,text>>
-(?su)[\\]?&lt;&lt;(?P<attrlist>[\w"].*?)&gt;&gt;=xref2
+(?su)[\\]?&lt;&lt;(?P<attrlist>[\w"_:].*?)&gt;&gt;=xref2
ifdef::asciidoc7compatible[]
# Index term: ++primary,secondary,tertiary++
diff --git a/doc/asciidoc.txt b/doc/asciidoc.txt
index 3abe290..7526260 100644
--- a/doc/asciidoc.txt
+++ b/doc/asciidoc.txt
@@ -2091,10 +2091,11 @@ Used to specify hypertext link targets:
[[<id>,<xreflabel>]]
anchor:<id>[<xreflabel>]
-The `<id>` is a unique identifier that must begin with a letter. The
-optional `<xreflabel>` is the text to be displayed by captionless
-'xref' macros that refer to this anchor. The optional `<xreflabel>` is
-only really useful when generating DocBook output. Example anchor:
+The `<id>` is a unique string that conforms to the output markup's
+anchor syntax. The optional `<xreflabel>` is the text to be displayed
+by captionless 'xref' macros that refer to this anchor. The optional
+`<xreflabel>` is only really useful when generating DocBook output.
+Example anchor:
[[X1]]
diff --git a/tests/data/testcases.txt b/tests/data/testcases.txt
index bd63a86..ae180b4 100644
--- a/tests/data/testcases.txt
+++ b/tests/data/testcases.txt
@@ -155,6 +155,11 @@ An [[X3, anchor reftext]] inline anchor with reftext.
Link to <<X3>> anchor.
+An example link to a bibliography entry <<Test::Unit>>.
+
+[horizontal]
+[[[Test::Unit]]]:: http://ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html
+
== Titles ==