State used to remap spec anchors to Antora resource IDs antora - True if remapping is to be done module - Antora component/module containing the spec to target xrefMap - dictionary mapping spec anchors to chapter anchors pageMap - dictionary mapping chapter anchors to
| 46 | } |
| 47 | |
| 48 | class RemapState: |
| 49 | """State used to remap spec anchors to Antora resource IDs |
| 50 | antora - True if remapping is to be done |
| 51 | module - Antora component/module containing the spec to target |
| 52 | xrefMap - dictionary mapping spec anchors to chapter anchors |
| 53 | pageMap - dictionary mapping chapter anchors to Antora page names |
| 54 | """ |
| 55 | |
| 56 | def __init__(self, antora=False, module='', pageMap={}, xrefMap={}): |
| 57 | self.antora = antora |
| 58 | self.module = module |
| 59 | self.pageMap = pageMap |
| 60 | self.xrefMap = xrefMap |
| 61 | |
| 62 | class RemapPatterns: |
| 63 | """Regular expressions used to remap spec anchors using RemapState |