<% content = final_legal_document_page.content.to_s %>
<% content.gsub!(/[^ ]\#{(\d+)}/m) { |m| @data_request.render_variable_latex(final_legal_document_page, $1) } %>
<% content.gsub!(/\#{(\d+)}/m) { |m| @data_request.render_variable_inline_latex(final_legal_document_page, $1) } %>
<% content = latex_safe(content) %>
<% content.gsub!(/\*\*(.*?)\*\*/, "\\textbf{\\1}") %>
<% content.gsub!(/==(.*?)==/, "\\hl{\\1}") %>
<% content.gsub!(/XX(YES)XX/, "\\cmark") %>
<% content.gsub!(/XX(NO)XX/, "\\xmark") %>
<% content.gsub!(/\"([a-zA-Z\s\.]*?)\"/, "``\\1''") %>
<% content.gsub!(/\*(.*?)\*/, "\\textit{\\1}") %>
<%= content %> \\

<% content = final_legal_document_page.content.to_s %>
<% content.gsub!(/[^ ]\#{(\d+)}/m) { |m| @data_request.render_variable_latex(final_legal_document_page, $1) } %>
<% content.gsub!(/\#{(\d+)}/m) { |m| @data_request.render_variable_inline_latex(final_legal_document_page, $1) } %>
<% content = latex_safe(content) %>
<% content.gsub!(/\*\*(.*?)\*\*/, "\\textbf{\\1}") %>
<% content.gsub!(/==(.*?)==/, "\\hl{\\1}") %>
<% content.gsub!(/XX(YES)XX/, "\\cmark") %>
<% content.gsub!(/XX(NO)XX/, "\\xmark") %>
<% content.gsub!(/\"([a-zA-Z\s\.-]*?)\"/, "``\\1''") %>
<% content.gsub!(/\*(.*?)\*/, "\\textit{\\1}") %>
<%= content %> \\

Correct quotes for words including dashes
Correct quotes for words including dashes
