Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't require blank line after metadata block.

  • Loading branch information...
commit d89590a6a803d7e8a1d04c8e1bf4a641e8dd6338 1 parent 1317e86
@jgm authored
Showing with 14 additions and 15 deletions.
  1. +7 −8 Network/Gitit/Page.hs
  2. +7 −7 README.markdown
View
15 Network/Gitit/Page.hs
@@ -33,13 +33,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- contents, and to include the page in the categories foo, bar,
- and baz.
-
-- The metadata block must end with a blank line. It may be
-- omitted entirely, and any particular line may be omitted.
-- The categories in the @categories@ field should be separated
-- by spaces. Commas will be treated as spaces.
--
-- Metadata value fields may be continued on the next line, as
-- long as it is nonblank and starts with a space character.
+- The metadata block may be omitted entirely, and any particular line
+- may be omitted. The categories in the @categories@ field should be
+- separated by spaces. Commas will be treated as spaces.
+-
+- Metadata value fields may be continued on the next line, as long as
+- it is nonblank and starts with a space character.
-
- Unrecognized metadata fields are simply ignored.
-}
@@ -69,7 +68,7 @@ pMetadataBlock = try $ do
ls <- many pMetadataLine
string "..."
pBlankline
- many1 pBlankline
+ skipMany pBlankline
rest <- getInput
return (ls, rest)
View
14 README.markdown
@@ -137,13 +137,13 @@ Pages may optionally begin with a metadata block. Here is an example:
\section{Why Category Theory?}
-The metadata block consists of a list of key-value pairs, each on a separate
-line. If needed, the value can be continued on one or more additional
-line, which must begin with a space. (This is illustrated by the "title"
-example above.) The metadata block must begin with a line `---` and end with
-a line `...` followed by one or more blank lines. (The metadata block is a
-valid YAML document, though not all YAML documents will be valid metadata
-blocks.)
+The metadata block consists of a list of key-value pairs, each on a
+separate line. If needed, the value can be continued on one or more
+additional line, which must begin with a space. (This is illustrated by
+the "title" example above.) The metadata block must begin with a line
+`---` and end with a line `...` optionally followed by one or more blank
+lines. (The metadata block is a valid YAML document, though not all YAML
+documents will be valid metadata blocks.)
Currently the following keys are supported:
Please sign in to comment.
Something went wrong with that request. Please try again.