diff --git a/program/code/main.py b/program/code/main.py
index 5f366675..df52084e 100644
--- a/program/code/main.py
+++ b/program/code/main.py
@@ -329,7 +329,7 @@ def translate_column(latex_column):
"""
Translate insides of a single latex tabular column to html
"""
- hline_string_literal = "hline"
+ hline_string_literal = "\\hline"
replaced_hline = latex_column.replace(hline_string_literal, "
")
replaced_newline = replaced_hline.replace("\newline", "
")
return replaced_newline
@@ -498,7 +498,7 @@ def handle_table_whole(html_string, data, table_start, table_end):
parameters_start_index = data.find(
"{", table_start + len(tabular_begin_string))
- parameters_end_index = data.find(" }", parameters_start_index)
+ parameters_end_index = data.find("}", parameters_start_index)
parameters_string = data[parameters_start_index: parameters_end_index + 1]
parameters_array = tabular_required_parameters(parameters_string)
inside_table = data[parameters_end_index + 1: table_end]
diff --git a/program/unit_tests/test_code/test_translate_inside_to_html.py b/program/unit_tests/test_code/test_translate_inside_to_html.py
index db469183..d55e8957 100644
--- a/program/unit_tests/test_code/test_translate_inside_to_html.py
+++ b/program/unit_tests/test_code/test_translate_inside_to_html.py
@@ -6,7 +6,9 @@ def given_correct_then_correct():
latex_string = "test & 2 & test \\ 4 & 5 & 6 \\"
parameters_string = "{ l | c | r }"
column_styles = tabular_required_parameters(parameters_string)
- assert translate_inside_to_html(latex_string, column_styles) == ""
+ assert translate_inside_to_html(latex_string, column_styles) == ""
+
+
def test_translate_inside_to_html():