Modified markdown reader to allow ordered list items to begin
with (single) letters, as well as numbers. The list item marker may now be terminated either by '.' or by ')'. These extensions to standard markdown are documented in README. git-svn-id: https://pandoc.googlecode.com/svn/trunk@211 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
4ab3eb3003
commit
7c319e55ff
2 changed files with 32 additions and 3 deletions
29
README
29
README
|
@ -283,6 +283,35 @@ paragraph. Since "Second" is followed by a list, and not a blank
|
|||
line, it isn't treated as a paragraph. The fact that the list
|
||||
is followed by a blank line is irrelevant.
|
||||
|
||||
Unlike standard markdown, Pandoc allows ordered list items to be
|
||||
marked with single letters, instead of numbers. So, for example,
|
||||
this source yields a nested ordered list:
|
||||
|
||||
1. First
|
||||
2. Second
|
||||
a. Fee
|
||||
b. Fie
|
||||
3. Third
|
||||
|
||||
Pandoc also extends standard markdown in allowing list item markers
|
||||
to be terminated by ')':
|
||||
|
||||
1) First
|
||||
2) Second
|
||||
A) Fee
|
||||
B) Fie
|
||||
3) Third
|
||||
|
||||
Note that Pandoc pays no attention to the *type* of ordered list
|
||||
item marker used. Thus, the following is treated just the same as
|
||||
the example above:
|
||||
|
||||
A) First
|
||||
1. Second
|
||||
2. Fee
|
||||
B) Fie
|
||||
C) Third
|
||||
|
||||
## Literal quotes in titles
|
||||
|
||||
Standard markdown allows unescaped literal quotes in titles, as
|
||||
|
|
|
@ -45,7 +45,7 @@ autoLinkEnd = '>'
|
|||
mathStart = '$'
|
||||
mathEnd = '$'
|
||||
bulletListMarkers = "*+-"
|
||||
orderedListDelimiters = "."
|
||||
orderedListDelimiters = ".)"
|
||||
escapeChar = '\\'
|
||||
hruleChars = "*-_"
|
||||
quoteChars = "'\""
|
||||
|
@ -276,7 +276,7 @@ orderedListStart =
|
|||
try (do
|
||||
option ' ' newline -- if preceded by a Plain block in a list context
|
||||
skipNonindentSpaces
|
||||
many1 digit
|
||||
many1 digit <|> count 1 letter
|
||||
oneOf orderedListDelimiters
|
||||
oneOf spaceChars
|
||||
skipSpaces)
|
||||
|
@ -535,7 +535,7 @@ title = choice [titleWith '(' ')', titleWith '"' '"', titleWith '\'' '\''] <?> "
|
|||
|
||||
link = choice [explicitLink, referenceLink] <?> "link"
|
||||
|
||||
explicitLink =
|
||||
explicitLink =
|
||||
try (do
|
||||
label <- reference
|
||||
src <- source
|
||||
|
|
Loading…
Add table
Reference in a new issue