github.com/googleapis/api-linter@v1.65.2/docs/rules/0192/no-markdown-headings.md (about) 1 --- 2 rule: 3 aip: 192 4 name: [core, '0192', no-markdown-headings] 5 summary: Public comments should not include Markdown headings. 6 permalink: /192/no-markdown-headings 7 redirect_from: 8 - /0192/no-markdown-headings 9 --- 10 11 # No Markdown headings 12 13 This rule enforces that public comments for proto descriptors do not have 14 Markdown headings (`#`, `##`, etc.), as mandated in [AIP-192][]. 15 16 ## Details 17 18 This rule looks at each descriptor in each proto file (exempting oneofs and the 19 file itself) and complains if _public_ comments include Markdown headings (that 20 become `<h1>`, `<h2>`, etc.). 21 22 ## Examples 23 24 **Incorrect** code for this rule: 25 26 ```proto 27 // Incorrect. 28 // # A representation of a book. 29 message Book { 30 // ## The resource name of the book. 31 string name = 1; 32 } 33 ``` 34 35 **Correct** code for this rule: 36 37 ```proto 38 // Correct. 39 // A representation of a book. 40 message Book { 41 // The resource name of the book. 42 string name = 1; 43 } 44 ``` 45 46 ## Disabling 47 48 If you need to violate this rule, use a leading comment above the descriptor. 49 Remember to also include an [aip.dev/not-precedent][] comment explaining why. 50 51 ```proto 52 // # A representation of a book. 53 // (-- api-linter: core::0192::no-markdown-headings=disabled 54 // aip.dev/not-precedent: We need to do this because reasons. --) 55 message Book { 56 // # The resource name of the book. 57 // (-- api-linter: core::0192::no-markdown-headings=disabled 58 // aip.dev/not-precedent: We need to do this because reasons. --) 59 string name = 1; 60 } 61 ``` 62 63 [aip-192]: https://aip.dev/192 64 [aip.dev/not-precedent]: https://aip.dev/not-precedent