Answers the list of matching style, with decreasing relevance.
(self, tag)
| 505 | return s |
| 506 | |
| 507 | def getMatchingStyleNames(self, tag): |
| 508 | """Answers the list of matching style, with decreasing relevance.""" |
| 509 | revHistory = self.tagHistory[:] |
| 510 | revHistory.reverse() |
| 511 | matches = [] |
| 512 | for n in range(len(revHistory)): |
| 513 | styleName = revHistory[:n+1] |
| 514 | styleName.reverse() |
| 515 | styleName = ' '.join(styleName) |
| 516 | style = self.getNamedStyle(styleName) |
| 517 | if style: |
| 518 | matches.append(styleName) |
| 519 | matches.reverse() |
| 520 | return matches |
| 521 | |
| 522 | def getNamedStyle(self, styleName): |
| 523 | """Answers the named style and otherwise an empty style dict if the |
no test coverage detected