Esempio n. 1
0
		def parse_title(heading_line):
			# checkbox is not heading
			if REGEX_HEADING.match(heading_line) is not None:
				return None
			m = REGEX_CHECKBOX.match(heading_line)
			if m:
				r = m.groupdict()
				return (len(r[u'level']), r[u'type'], r[u'status'], r[u'title'])

			return None
Esempio n. 2
0
		def parse_title(heading_line):
			# checkbox is not heading
			if REGEX_HEADING.match(heading_line) is not None:
				return None
			m = REGEX_CHECKBOX.match(heading_line)
			if m:
				r = m.groupdict()
				return (len(r[u'level']), r[u'type'], r[u'status'], r[u'title'])

			return None
Esempio n. 3
0
    def identify_checkbox(cls, line):
        u""" Test if a certain line is a checkbox or not.

		:line: the line to check

		:returns: indent_level
		"""
        # checkbox is not heading
        if REGEX_HEADING.match(line) is not None:
            return None
        m = REGEX_CHECKBOX.match(line)
        if m:
            r = m.groupdict()
            return len(r[u'level'])

        return None
Esempio n. 4
0
	def identify_checkbox(cls, line):
		u""" Test if a certain line is a checkbox or not.

		:line: the line to check

		:returns: indent_level
		"""
		# checkbox is not heading
		if REGEX_HEADING.match(line) is not None:
			return None
		m = REGEX_CHECKBOX.match(line)
		if m:
			r = m.groupdict()
			return len(r[u'level'])

		return None