Find the position of a token in self.

Property definitions

markdown $ MarkdownProcessor :: find_token
	# Find the position of a `token` in `self`.
	fun find_token(text: Text, start: Int, token: Token): Int do
		var pos = start
		while pos < text.length do
			if token_at(text, pos).is_same_type(token) then
				return pos
			end
			pos += 1
		end
		return -1
	end
lib/markdown/markdown.nit:485,2--495,4