aboutsummaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-11-22 17:14:21 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-11-22 17:14:21 +0000
commitf7b705b44cfff881d12501eb8061ebdf20627632 (patch)
treeb786427e010f0529c41a8055b6f4769e4023f9b7 /README
parent8d334b84cc51b16a6f010cd775f22b8072de9e7a (diff)
downloadpandoc-f7b705b44cfff881d12501eb8061ebdf20627632.tar.gz
Implemented implicit reference-style links to section headers in markdown.
For example, if you have a header '# Supported architectures', you can link to it with '[Supported architectures]'. If there are multiple headers with this label, the link will point to the first of them. Implicit references are always overridden by explicitly specified references. Addresses Issue #20. + Moved isPunctuation, uniqueIdentifiers, and inlineListToIdentifier from Text.Pandoc.Writers.HTML to Text.Pandoc.Shared. + Added stHeaders to ParserState. This holds a list of header texts used in the document, and is used to construct implicit header references. + In Text.Pandoc.Readers.Markdown, added call to headerReference parser in initial parsing pass, constructing a list of section header labels. This is then passed to uniqueIdentifiers to produce identifiers, and a list of implicit references is constructed. This is added to the end of the explicitly specified references, so it will be overridden by explicitly specified references. All of this processing is skipped if --strict was specified. + Modified documentation in README. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1086 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'README')
-rw-r--r--README26
1 files changed, 23 insertions, 3 deletions
diff --git a/README b/README
index a4085db5e..f1361fcd7 100644
--- a/README
+++ b/README
@@ -299,7 +299,7 @@ For further documentation, see the `pandoc(1)` man page.
: includes *string* as a prefix at the beginning of the title that
appears in the HTML header (but not in the title as it appears at
the beginning of the HTML body). (See below on
- [Title Blocks](#title-blocks).)
+ [Title Blocks].)
`-S` or `--smart`
: causes `pandoc` to produce typographically correct output, along the
@@ -797,8 +797,28 @@ another. A link to this section, for example, might look like this:
See the section on [header identifiers](#header-identifiers-in-html).
-Note, however, that this method of providing links to sections works
-only in HTML.
+Note that this method of providing links to sections works only in
+HTML.
+
+Shortcut links to section headers
+---------------------------------
+
+You may use the following shortcut to link to a section header:
+
+ See the section on [Header identifiers in HTML].
+
+Pandoc will behave as if the document contains
+
+ [Header identifiers in HTML]: #header-identifiers-in-html
+
+If there are multiple headers labeled "Header identifiers in HTML",
+this will link to the first one. Note that implicit references are always
+overridden by explicit ones, so the link in the following text
+will be to `/url`, not `#header-identifiers-in-html`:
+
+ See the section on [Header identifiers in HTML].
+
+ [Header identifiers in HTML]: /url
Box-style blockquotes
---------------------