Commit 45dbfcdc authored by Raniere Silva's avatar Raniere Silva
Browse files

Fix check of glossary item

CommonMark doesn't support definition list
and we have to workaround this limitation.

This commit removes the request
that line continuation start with four white spaces
because (1) CommonMark remove the white spaces and
(2) Pandoc doesn't care about it.

    $ pandoc <<EOF
    foo
    :   bar
        continue
    EOF
    <dl>
    <dt>foo</dt>
    <dd>bar continue
    </dd>
    </dl>
    $ pandoc <<EOF
    foo
    :   bar
    continue
    EOF
    <dl>
    <dt>foo</dt>
    <dd>bar continue
    </dd>
    </dl>
parent e8e144be
Loading
Loading
Loading
Loading
+8 −18
Original line number Diff line number Diff line
@@ -565,8 +565,7 @@ class ReferencePageValidator(MarkdownValidator):

        entry_is_valid = True
        for line_index, line in enumerate(glossary_entry):
            if line_index == 1:
                if not re.match("^:   ", line):
            if line_index == 1 and not re.match("^:   ", line):
                logging.error(
                    "In {0}: "
                    "At glossary entry '{1}' "
@@ -574,15 +573,6 @@ class ReferencePageValidator(MarkdownValidator):
                    "start with ':    '.".format(
                        self.filename, glossary_keyword))
                entry_is_valid = False
            elif line_index > 1:
                if not re.match("^    ", line):
                    logging.error(
                        "In {0}: "
                        "At glossary entry '{1}' "
                        "Subsequent lines of definition must "
                        "start with '     '.".format(
                            self.filename,  glossary_keyword, ))
                    entry_is_valid = False
        return entry_is_valid

    def _validate_glossary(self):