<commit_before>$('#suggestions').typed({
    strings: ["chocolate chip cookies", "brownies", "pancakes"],
    typeSpeed: 50,
    backSpeed: 15,
    backDelay: 1500,
    loop: true,
});

$('#recipe-form').submit(function() {
	get_recipe($('#recipe-title').val());
	return false;
});

function get_recipe(title) {
	var url = '/recipe/search/' + title;
	$.get(url, 
	function(data) {
		$('#ingredients').empty();
		$('#method').empty();

		data = JSON.parse(data);
		$('#title').text("Recipe for " + data.title);
for (i = 0; i < data.ingredients.length; i++) {
	 	$('#ingredients').append('<li>' + data.ingredients[i][0] + data.ingredients[i][1] + " " + data.ingredients[i][2] + '</li>');
}
		for (i = 0; i < data.method.length; i++) {
			$('#method').append('<li>' + data.method[i] + '</li>');
		}
	});
}
<commit_msg>Fix JSON parsing bug, ingredients displayed correctly again.<commit_after>$('#suggestions').typed({
    strings: ["chocolate chip cookies", "brownies", "pancakes"],
    typeSpeed: 50,
    backSpeed: 15,
    backDelay: 1500,
    loop: true
});

$('#recipe-form').submit(function() {
    get_recipe($('#recipe-title').val());
    return false;
});

function get_recipe(title) {
    var url = '/recipe/search/' + title;
    $.get(url,
        function(data) {
            $('#ingredients').empty();
            $('#method').empty();

            $('#title').text("Recipe for " + data.title);
            for (i = 0; i < data.ingredients.length; i++) {
                $('#ingredients').append('<li>' + data.ingredients[i][0] + data.ingredients[i][1] + " " + data.ingredients[i][2] + '</li>');
            }
            for (i = 0; i < data.method.length; i++) {
                $('#method').append('<li>' + data.method[i] + '</li>');
            }
        }
    );
}
{'fraction_non_alphanumeric': 0.23847019122609675, 'fraction_numerical': 0.014623172103487065, 'mean_word_length': 2.9887892376681613, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 11, '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': '7534374', 'n_tokens_mistral': 646, 'n_tokens_neox': 605, 'n_words': 113}