Checks whether the current line is the start of a new RST-style section. RST uses directives to specify information. An RST directive, which we refer to as a section here, are surrounded with colons. For example, :param name:. Args: line_info: Information about the current line. Return
(line_info)
| 703 | |
| 704 | |
| 705 | def _rst_section(line_info): |
| 706 | """Checks whether the current line is the start of a new RST-style section. |
| 707 | |
| 708 | RST uses directives to specify information. An RST directive, which we refer |
| 709 | to as a section here, are surrounded with colons. For example, :param name:. |
| 710 | |
| 711 | Args: |
| 712 | line_info: Information about the current line. |
| 713 | Returns: |
| 714 | A Section type if one matches, or None if no section type matches. |
| 715 | """ |
| 716 | directive = _get_directive(line_info) |
| 717 | if directive: |
| 718 | possible_title = directive.split()[0] |
| 719 | return _section_from_possible_title(possible_title) |
| 720 | else: |
| 721 | return None |
| 722 | |
| 723 | |
| 724 | def _line_is_hyphens(line): |
no test coverage detected