Spaces:
Running
Running
Update app.py
Browse filesI think I accidentally entered a tab, cfreating a syntax error in the previous code
116 unmodified lines11711811912012012112211 unmodified lines13413513613813713813914014114014114214214314414514614712 unmodified lines160161162161163164165177 unmodified lines343344345345346347348349116 unmodified lines word_index = 0 while word_index < len(words_data): # First table row needs 1 slot for reference block + 6 slots for words = 7 total columns current_limit = 6 if len(chunks) == 0 else 7 word = words_data[word_index]11 unmodified lines return chunks
def build_html_tables(manuscript, reference, words_data): # Rule: Table is explicitly locked to 7.0 inches wide overall total_table_width_in = 7.0 # Static overall structural boundaries matching your publishing layout template # Native margins forced to auto and align center for seamless Google Docs insertion table_style = ( "width: 7.0in !important; min-width: 7.0in !important; max-width: 7.0in !important; " "table-layout: fixed !important; border-collapse: collapse; margin-bottom: 4pt; " "direction: rtl; border: 1pt solid #b7b7b7; background-color: #ffffff; " f"width: {total_table_width_in}in !important; min-width: {total_table_width_in}in !important; " f"max-width: {total_table_width_in}in !important; table-layout: fixed !important; border-collapse: collapse; " "margin-bottom: 4pt; direction: rtl; border: 1pt solid #b7b7b7; background-color: #ffffff; " "line-height: 1.0 !important; height: auto; margin-left: auto !important; margin-right: auto !important;" ) 12 unmodified lines current_chunk.append({"hebrew": " ", "transliteration": " ", "translation": " ", "morphology": " "}) allocated_slots += 1
# Native align="center" makes Google Docs automatically center the table on paste html_output.append(f'<table style="{table_style}" align="center">') # Rule: Every column is locked to exactly 1.0 inch wide to guarantee a 7.0 inch total width177 unmodified lines outputs=[status_panel, output_html, copy_btn], show_progress="hidden" ) clear_btn.click(fn=None, inputs=[], outputs=[text_string_input], js="() => ''") clear_btn.click(fn=None, inputs=[], outputs=[text_string_input], js="() => ''") copy_btn.click(fn=None, js=copy_js)
if __name__ == "__main__":app.py+8-7