Implemented RenderSequence for MarkdownTextRenderer.

This commit is contained in:
Matteo Kloiber 2015-04-03 14:10:33 +02:00
parent e7de9eabe6
commit 31f6e9a66d
2 changed files with 80 additions and 43 deletions

View File

@ -8,13 +8,7 @@ import (
// TextRender adds common methods for rendering a text on screeen. // TextRender adds common methods for rendering a text on screeen.
type TextRender interface { type TextRender interface {
NormalizedText(text string) string NormalizedText(text string) string
RenderSequence(text string, lastColor, background Attribute) RenderedSubsequence RenderSequence(text string, lastColor, background Attribute) RenderedSequence
}
type subSecequence struct {
start int
end int
color Attribute
} }
// MarkdownRegex is used by MarkdownTextRenderer to determine how to format the // MarkdownRegex is used by MarkdownTextRenderer to determine how to format the