Package de.firemage.autograder.span
Class Formatter
java.lang.Object
de.firemage.autograder.span.Formatter
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Formatter
-
Formatter
-
-
Method Details
-
viewbox
public int viewbox()Describes the number of lines that are relevant for the span.It can be used to omit lines that are not relevant.
For example, a viewbox of 2 would result in the following output:
1 | fn main() { | ___________^ 2 | | some code; 3 | | more code; .. | | 10 | | more code; 11 | | more code 12 | | } | |_^ 13 | 14 | fn another_function { }Here the two lines before and after the span are shown. So a viewbox of 0 will only show the lines of the span.
- Returns:
- the current value of the viewbox
-
render
Renders the given text of source code.- Parameters:
text- the text to highlight- Returns:
- the highlighted text
-