Skip to content

Commit 993ab3e

Browse files
ekinhbayarnikic
authored andcommitted
Fix markdown and grammar tool
1 parent befef5a commit 993ab3e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

spec/00-specification-for-php.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- This file is autogenerated, do not edit it manually -->
22
<!-- Run tools/toc.php instead -->
33

4-
#Specification for PHP
4+
# Specification for PHP
55
Facebook has dedicated all copyright to this specification to the public
66
domain worldwide under the CC0 Public Domain Dedication located at
77
<http://creativecommons.org/publicdomain/zero/1.0/>. This specification

tools/grammar.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ function($matches) use($names, $fileName) {
4848
$grammarFile = $dir . '19-grammar.md';
4949

5050
$output = <<<'END'
51-
#Grammar
51+
# Grammar
5252
53-
##General
53+
## General
5454
5555
The grammar notation is described in [Grammars section](09-lexical-structure.md#grammars).
5656
57-
##Lexical Grammar
57+
## Lexical Grammar
5858

5959

6060
END;
6161

6262
$lexical = file_get_contents($dir . '09-lexical-structure.md');
63-
$lexical = strstr($lexical, '##Lexical analysis');
63+
$lexical = strstr($lexical, '## Lexical analysis');
6464
$output .= extract_grammar($lexical, $names);
6565

66-
$output .= "\n\n##Syntactic Grammar";
66+
$output .= "\n\n## Syntactic Grammar";
6767

6868
$skipFiles = ['05-types.md', '09-lexical-structure.md', '19-grammar.md'];
6969
foreach (spec_files($skipFiles) as $fileName => $path) {
@@ -74,7 +74,7 @@ function($matches) use($names, $fileName) {
7474
}
7575

7676
$heading = extract_heading($code);
77-
$output .= "\n\n###$heading\n\n" . $grammar;
77+
$output .= "\n\n### $heading\n\n" . $grammar;
7878
}
7979

8080
$output .= "\n";

0 commit comments

Comments
 (0)