From 52d36c28635a0ddcfbd1520c7cbdb0719d0ec5b4 Mon Sep 17 00:00:00 2001 From: D024504 Date: Tue, 1 Aug 2023 17:09:59 +0200 Subject: [PATCH] Fixed bug in section links with digits --- docs/odata-protocol/odata-protocol.html | 10 +++++----- docs/odata-protocol/odata-protocol.md | 10 +++++----- lib/number.js | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 0f5a13742..26c253250 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -2583,7 +2583,7 @@

OData-MaxVersion (section 8.2.7)
  • MUST follow OData guidelines for extensibility (section 6 and all subsections)
  • -
  • MUST successfully parse the request according to OData-ABNF for any supported system query options and either follow the specification or return 501 Not Implemented for any unsupported functionality ([section 1501NotImplemented])
  • +
  • MUST successfully parse the request according to OData-ABNF for any supported system query options and either follow the specification or return 501 Not Implemented for any unsupported functionality (section 9.3.1)
  • MUST expose only data types defined in OData-CSDLXML
  • MUST NOT require clients to understand any metadata or instance annotations (section 6.4), custom headers (section 6.5), or custom content (section 6.2) in the payload in order to correctly consume the service
  • MUST NOT violate any OData update semantics (section 11.4 and all subsections)
  • @@ -2621,7 +2621,7 @@

  • MUST conform to the OData 4.0 Minimal Conformance Level
  • -
  • MUST successfully parse the OData-ABNF and either follow the specification or return 501 Not Implemented for any unsupported functionality ([section 2501NotImplemented])
  • +
  • MUST successfully parse the OData-ABNF and either follow the specification or return 501 Not Implemented for any unsupported functionality (section 9.3.1)
  • MUST support $select (section 11.2.5.1)`
  • MUST support casting to a derived type according to OData URL if derived types are present in the model
  • MUST support $top (section 11.2.6.3)
  • @@ -2630,8 +2630,8 @@

  • MUST support eq, ne filter operations on properties of entities in the requested entity set (section 11.2.6.1)
  • MUST support aliases in $filter expressions (section 11.2.6.1.2)
  • -
  • SHOULD support additional filter operations (section 11.2.6.1.1) and MUST return 501 Not Implemented for any unsupported filter operations ([section 3501NotImplemented])
  • -
  • SHOULD support the canonical functions (section 11.2.6.1.1) and MUST return 501 Not Implemented for any unsupported canonical functions ([section 4501NotImplemented])
  • +
  • SHOULD support additional filter operations (section 11.2.6.1.1) and MUST return 501 Not Implemented for any unsupported filter operations (section 9.3.1)
  • +
  • SHOULD support the canonical functions (section 11.2.6.1.1) and MUST return 501 Not Implemented for any unsupported canonical functions (section 9.3.1)
  • SHOULD support $filter on expanded entities (section 11.2.5.2.1)
  • SHOULD publish metadata at $metadata according to OData-CSDLXML (section 11.1.2)
  • @@ -2774,7 +2774,7 @@

    MUST specify the OData-MaxVersion header in requests (section 8.2.7)
  • MUST specify OData-Version (section 8.1.5) and Content-Type (section 8.1.1) in any request with a payload
  • MUST be a conforming consumer of OData as defined in OData-JSON
  • -
  • MUST follow redirects ([section 53xxRedirection])
  • +
  • MUST follow redirects (section 9.1.5)
  • MUST correctly handle next links (section 11.2.6.7)
  • MUST support instances returning properties and navigation properties not specified in metadata (section 11.2)
  • MUST generate PATCH requests for updates, if the client supports updates (section 11.4.3)
  • diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 94286100d..572f87580 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -6261,7 +6261,7 @@ request [OData-ABNF](#ODataABNF) for any supported system query options and either follow the specification or return [`501 Not Implemented`](#ResponseCode501NotImplemented) for any -unsupported functionality ([section 1501NotImplemented]) +unsupported functionality ([section 9.3.1](#ResponseCode501NotImplemented)) 8. MUST expose only data types defined in [OData-CSDLXML](#ODataCSDL) 9. MUST NOT require clients to understand any metadata or instance annotations ([section 6.4](#VocabularyExtensibility)), custom headers ([section 6.5](#HeaderFieldExtensibility)), or custom @@ -6329,7 +6329,7 @@ service: Level](#OData40MinimalConformanceLevel) 2. MUST successfully parse the [OData-ABNF](#ODataABNF) and either follow the specification or return `501 Not Implemented` for any -unsupported functionality ([section 2501NotImplemented]) +unsupported functionality ([section 9.3.1](#ResponseCode501NotImplemented)) 3. MUST support `$select` ([section 11.2.5.1](#SystemQueryOptionselect))` 4. MUST support casting to a derived type according to [OData URL](#ODataURL) if derived types are present in the model @@ -6341,10 +6341,10 @@ in the requested entity set ([section 11.2.6.1](#SystemQueryOptionfilter)) 2. MUST support aliases in `$filter` expressions ([section 11.2.6.1.2](#ParameterAliases)) 3. SHOULD support additional filter operations ([section 11.2.6.1.1](#BuiltinQueryFunctions)) and MUST return `501 Not Implemented` for any unsupported filter -operations ([section 3501NotImplemented]) +operations ([section 9.3.1](#ResponseCode501NotImplemented)) 4. SHOULD support the canonical functions ([section 11.2.6.1.1](#BuiltinQueryFunctions)) and MUST return `501 Not Implemented` for any unsupported canonical -functions ([section 4501NotImplemented]) +functions ([section 9.3.1](#ResponseCode501NotImplemented)) 5. SHOULD support `$filter` on expanded entities ([section 11.2.5.2.1](#ExpandOptions)) 8. SHOULD publish metadata at `$metadata` according to [OData-CSDLXML](#ODataCSDL) ([section 11.1.2](#MetadataDocumentRequest)) @@ -6575,7 +6575,7 @@ To be generally interoperable, OData clients ([section 8.1.1](#HeaderContentType)) in any request with a payload 3. MUST be a conforming consumer of OData as defined in [OData-JSON](#ODataJSON) -4. MUST follow redirects ([section 53xxRedirection]) +4. MUST follow redirects ([section 9.1.5](#ResponseCode3xxRedirection)) 5. MUST correctly handle next links ([section 11.2.6.7](#ServerDrivenPaging)) 6. MUST support instances returning properties and navigation properties not specified in metadata ([section 11.2](#RequestingData)) diff --git a/lib/number.js b/lib/number.js index 2788f65cd..ed42d9de6 100644 --- a/lib/number.js +++ b/lib/number.js @@ -61,7 +61,7 @@ class Number { if (this.skip(line)) return; for (var m, regex = //g; (m = regex.exec(line)); ) this.refs[m[1]] = true; - m = line.match(/ ##([A-Za-z]+)(_([A-Za-z]+))?/); + m = line.match(/ ##([A-Za-z0-9]+)(_([A-Za-z0-9]+))?/); if (m && line[m.index + m[0].length] !== "]") { if ( !m[1].startsWith("sub") && @@ -70,7 +70,7 @@ class Number { ) this.toc[m[1]] = { sub: [] }; if (m[1].endsWith("sec")) { - m = line.match(/ ##([A-Za-z]+)(?:_[A-Za-z]+)?\s+(.+)$/); + m = line.match(/ ##([A-Za-z0-9]+)(?:_[A-Za-z0-9]+)?\s+(.+)$/); m[3] = m[2].replace(/[^A-Za-z0-9]/g, ""); } this.counter[m[1]] = (this.counter[m[1]] || 0) + 1; @@ -146,7 +146,7 @@ class Number { this.errors.push( `${this.dir}/${file}(${lineno}): Undefined link #${m[1]}` ); - m = line.match(/ ##([A-Za-z]+)(_([A-Za-z]+))?/); + m = line.match(/ ##([A-Za-z0-9]+)(_([A-Za-z0-9]+))?/); var outline = line; if (m && line[m.index + m[0].length] !== "]") { var prefix = line.substring(0, m.index) + " "; @@ -163,7 +163,7 @@ class Number { } out.write( outline.replace( - /##([A-Za-z]+)\]/g, + /##([A-Za-z0-9]+)\]/g, function (m, p) { var r = this.refs[p]; if (r) return `${r}](#${p})`;