CDLUC3 / dmptool

DMPTool version of the DMPRoadmap codebase
https://dmptool.org
MIT License
59 stars 13 forks source link

Fixed a bug that was causing content to be excluded from .docx export… #660

Closed jupiter007 closed 3 weeks ago

jupiter007 commented 3 weeks ago

We recently discovered that text in exported .docx plans was sometimes missing.

I did some research into it and it appears that docx is not happy when there is a tag, then some text or characters, then a
tag all within a

tag. All content after the
tag, within that

tag is somehow not included in the exported plan.

Fixes #647

Changes proposed in this PR:

Testing:

  1. I copied over the problematic content referenced in the ticket, into my plan. "Biochemical Assay Data: Results from various biochemical assays assessing the binding and cleaving activities of NLRP3 and other pyrin-domain proteins on oxidized DNA. Cell Signaling Data: Measurements from cell-based assays evaluating the activation of NLRP3 inflammasome and downstream signaling pathways under different stress conditions."

"Public Repositories: Published data will be deposited in publicly accessible repositories such as the Electron Microscopy Data Bank (EMDB) and the Protein Data Bank (PDB) for long-term access and preservation. Constructs and Reagents:"

"Direct Requests: Researchers can email redacted name for privacy to request reagents and materials needed to duplicate the data, facilitating reproducibility and collaboration."

  1. I then downloaded a .docx file WITHOUT my regex fix. You can see where the missing content should be in the outlined red boxes:

    image
  2. Then I added my regex fix, and downloaded the .docx file again. You can see the missing content is now present, and the formatting looks the same as in the originally entered text in the plan:

image
jupiter007 commented 3 weeks ago

3. Then I added my regex fix, and downloaded the .docx file again. You can see the missing content is now present, and the formatting looks the same as in the originally entered text in the plan:

Thank you for pointing that out @briri.