Commit ec4dabb5 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity: we may have same href but with different title

alse replace | by br
parent ba7eec4f
......@@ -85,14 +85,14 @@ for citation in re.findall(r'\[(.*?)\]', document_content or ''):
continue
# Those 3 parts has similar codes, leave as it so that it's easy to customize for each other
if citation_type == "AD":
if citation_href not in citation_ad_doubles:
citation_ad_doubles[citation_href] = citation_ad_count
if (citation_href, citation_info[0]) not in citation_ad_doubles:
citation_ad_doubles[(citation_href, citation_info[0])] = citation_ad_count
citation_id = ''.join([citation_type, "-", str(citation_ad_count)])
citation_dict["item"] = {
"type": citation_type,
"title": citation_info[0],
"number": citation_info[1],
"version": citation_info[2],
"title": citation_info[0].replace('|', '<br/>'),
"number": citation_info[1].replace('|', '<br/>'),
"version": citation_info[2].replace('|', '<br/>'),
"href": citation_href,
"id": citation_id
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment