Skip to content

Commit

Permalink
[gw] (2) Allow Emacs-style mode lines on the first line of a cache ma…
Browse files Browse the repository at this point in the history
…nifest file. (credit: ap)

git-svn-id: http://svn.whatwg.org/webapps@2712 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 27, 2009
1 parent 6c1892d commit 6feeaef
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 28 deletions.
30 changes: 17 additions & 13 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -36802,11 +36802,11 @@ style/default.css</pre>

<p>The first line of an application cache manifest must consist of
the string "CACHE", a single U+0020 SPACE character, the string
"MANIFEST", and zero or more U+0020 SPACE and U+0009 CHARACTER
TABULATION (tab) characters. The first line may optionally be
preceded by a U+FEFF BYTE ORDER MARK (BOM) character. If any other
text is found on the first line, the user agent will ignore the
entire file.</p>
"MANIFEST", and either a U+0020 SPACE character, a U+0009 CHARACTER
TABULATION (tab) character, a U+000A LINE FEED (LF) character, or a
U+000D CARRIAGE RETURN (CR) character. The first line may optionally
be preceded by a U+FEFF BYTE ORDER MARK (BOM) character. If any
other text is found on the first line, it is ignored.</p>

<p>Subsequent lines, if any, must all be one of the following:</p>

Expand Down Expand Up @@ -36948,25 +36948,29 @@ style/default.css</pre>
abort this algorithm with a failure while checking for the magic
signature.</li>

<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
U+0020 SPACE or U+0009 CHARACTER TABULATION (tab)
characters.</li>

<li><p>If <var title="">position</var> is not past the end of <var title="">input</var> and the character at <var title="">position</var> is neither a U+000A LINE FEED (LF)
characters nor a U+000D CARRIAGE RETURN (CR) character, then this
isn't a cache manifest; abort this algorithm with a failure while
checking for the magic signature.</li>
<li><p>If the character at <var title="">position</var> is neither
a U+0020 SPACE character, a U+0009 CHARACTER TABULATION (tab)
character, U+000A LINE FEED (LF) character, nor a U+000D CARRIAGE
RETURN (CR) character, then this isn't a cache manifest; abort this
algorithm with a failure while checking for the magic
signature.</li>

<li><p>This is a cache manifest. The algorithm cannot fail beyond
this point (though bogus lines can get ignored).</li>

<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)
characters, and ignore those characters. (Extra text on the first
line, after the signature, is ignored.)</li>

<li><p>Let <var title="">mode</var> be "explicit".</li>

<li><p><em>Start of line</em>: If <var title="">position</var> is
past the end of <var title="">input</var>, then jump to the last
step. Otherwise, <a href=#collect-a-sequence-of-characters>collect a sequence of characters</a> that
are U+000A LINE FEED (LF), U+000D CARRIAGE RETURN (CR), U+0020
SPACE, or U+0009 CHARACTER TABULATION (tab) characters.</li>
<!-- strips leading spaces, ignores space-only lines, ignores blank lines -->

<li><p>Now, <a href=#collect-a-sequence-of-characters>collect a sequence of characters</a> that are
<em>not</em> U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)
Expand Down
32 changes: 17 additions & 15 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -41847,11 +41847,11 @@ style/default.css</pre>

<p>The first line of an application cache manifest must consist of
the string "CACHE", a single U+0020 SPACE character, the string
"MANIFEST", and zero or more U+0020 SPACE and U+0009 CHARACTER
TABULATION (tab) characters. The first line may optionally be
preceded by a U+FEFF BYTE ORDER MARK (BOM) character. If any other
text is found on the first line, the user agent will ignore the
entire file.</p>
"MANIFEST", and either a U+0020 SPACE character, a U+0009 CHARACTER
TABULATION (tab) character, a U+000A LINE FEED (LF) character, or a
U+000D CARRIAGE RETURN (CR) character. The first line may optionally
be preceded by a U+FEFF BYTE ORDER MARK (BOM) character. If any
other text is found on the first line, it is ignored.</p>

<p>Subsequent lines, if any, must all be one of the following:</p>

Expand Down Expand Up @@ -42009,27 +42009,29 @@ style/default.css</pre>
abort this algorithm with a failure while checking for the magic
signature.</p></li>

<li><p><span>Collect a sequence of characters</span> that are
U+0020 SPACE or U+0009 CHARACTER TABULATION (tab)
characters.</p></li>

<li><p>If <var title="">position</var> is not past the end of <var
title="">input</var> and the character at <var
title="">position</var> is neither a U+000A LINE FEED (LF)
characters nor a U+000D CARRIAGE RETURN (CR) character, then this
isn't a cache manifest; abort this algorithm with a failure while
checking for the magic signature.</p></li>
<li><p>If the character at <var title="">position</var> is neither
a U+0020 SPACE character, a U+0009 CHARACTER TABULATION (tab)
character, U+000A LINE FEED (LF) character, nor a U+000D CARRIAGE
RETURN (CR) character, then this isn't a cache manifest; abort this
algorithm with a failure while checking for the magic
signature.</p></li>

<li><p>This is a cache manifest. The algorithm cannot fail beyond
this point (though bogus lines can get ignored).</p></li>

<li><p><span>Collect a sequence of characters</span> that are
<em>not</em> U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)
characters, and ignore those characters. (Extra text on the first
line, after the signature, is ignored.)</p></li>

<li><p>Let <var title="">mode</var> be "explicit".</p></li>

<li><p><em>Start of line</em>: If <var title="">position</var> is
past the end of <var title="">input</var>, then jump to the last
step. Otherwise, <span>collect a sequence of characters</span> that
are U+000A LINE FEED (LF), U+000D CARRIAGE RETURN (CR), U+0020
SPACE, or U+0009 CHARACTER TABULATION (tab) characters.</p></li>
<!-- strips leading spaces, ignores space-only lines, ignores blank lines -->

<li><p>Now, <span>collect a sequence of characters</span> that are
<em>not</em> U+000A LINE FEED (LF) or U+000D CARRIAGE RETURN (CR)
Expand Down

0 comments on commit 6feeaef

Please sign in to comment.