| 20 | |
| 21 | |
| 22 | class GHMarkdown(Markdown): |
| 23 | def addHeader(self, text, h=1): |
| 24 | self.addLine("\n{header} {text}\n".format(header=h * '#', text=text), True) |
| 25 | |
| 26 | def addDocHeader(self): |
| 27 | self.addLine("---") |
| 28 | self.addLine("docid: operators-catalog") |
| 29 | self.addLine("title: Operators Catalog") |
| 30 | self.addLine("layout: operators") |
| 31 | self.addLine("permalink: /docs/operators-catalogue.html") |
| 32 | self.addLine("---") |
| 33 | self.addLine("* TOC") |
| 34 | self.addLine("{:toc}") |
| 35 | |
| 36 | def addTable(self, table, noTitle=False): |
| 37 | self.addLinebreak() |
| 38 | assert(len(table) > 1) |
| 39 | self.addLine(' | '.join(['----------' for i in range(len(table[0]))])) |
| 40 | self.addLine(' | '.join(table[0])) |
| 41 | for row in table[1:]: |
| 42 | self.addLine(' | '.join(row)) |
| 43 | |
| 44 | def addTableHTML(self, table, noTitle=False): |
| 45 | self.addRaw("<table>") |
| 46 | for row in table: |
| 47 | self.addRaw("<tr>") |
| 48 | for cell in row: |
| 49 | self.addRaw("<td>") |
| 50 | self.addLine("{cell}".format(cell=cell)) |
| 51 | self.addRaw("</td>") |
| 52 | self.addRaw("</tr>") |
| 53 | self.addRaw("</table>") |
| 54 | |
| 55 | def getCodeLink(formatter, schema): |
| 56 | formatter = formatter.clone() |
no outgoing calls
no test coverage detected
searching dependent graphs…