<commit_before>package br.com.caelum.tubaina.parser.latex;

import br.com.caelum.tubaina.parser.Indentator;
import br.com.caelum.tubaina.parser.Tag;

public class CodeTag implements Tag {

	private final Indentator indentator;

	public static final String BEGIN = "{\\begin{flushright} \\begin{minipage}{16.9cm} \\small \n\\begin{minted}";
	public static final String END = "\n\\end{minted}\n\\end{minipage}\\end{flushright}}";

	public CodeTag(Indentator indentator) {
		this.indentator = indentator;
	}

	public String parse(String string, String options) {
		String chosenLanguage = options == null ? "" : options.trim().split(" ")[0].trim();	
		if(chosenLanguage.isEmpty()){
			chosenLanguage = "text";
		}
		String lineNumbers = options.contains("#") ? "[linenos]": "";
		
		String indentedString = this.indentator.indent(string);
		return CodeTag.BEGIN + lineNumbers + "{" + chosenLanguage + "}\n" + indentedString + CodeTag.END;
	}
	

	
}<commit_msg>line numbers will appear closer to the code, now<commit_after>package br.com.caelum.tubaina.parser.latex;

import br.com.caelum.tubaina.parser.Indentator;
import br.com.caelum.tubaina.parser.Tag;

public class CodeTag implements Tag {

	private final Indentator indentator;

	public static final String BEGIN = "{\\begin{flushright} \\begin{minipage}{16.9cm} \\small \n\\begin{minted}";
	public static final String END = "\n\\end{minted}\n\\end{minipage}\\end{flushright}}";

	public CodeTag(Indentator indentator) {
		this.indentator = indentator;
	}

	public String parse(String string, String options) {
		String chosenLanguage = options == null ? "" : options.trim().split(" ")[0].trim();	
		if(chosenLanguage.isEmpty()){
			chosenLanguage = "text";
		}
		String lineNumbers = options.contains("#") ? "[linenos, numbersep=5pt]": "";
		
		String indentedString = this.indentator.indent(string);
		return CodeTag.BEGIN + lineNumbers + "{" + chosenLanguage + "}\n" + indentedString + CodeTag.END;
	}
	
}
{'fraction_non_alphanumeric': 0.15247322794492607, 'fraction_numerical': 0.004589495155532891, 'mean_word_length': 4.558073654390935, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2402739', 'n_tokens_mistral': 685, 'n_tokens_neox': 639, 'n_words': 137}