Conversation
108b688 to
ed042ff
Compare
|
Can you provide an example of this happening? If the tags are properly closed, etree shouldn't cut them off afaict |
|
|
I'm sorry for my lack of familiarity with this code, I don't feel like I can review this 😕 I was hoping if I asked I'd be able to better understand but I think it's just too deep in the weeds for me anymore! I'm not sure how to evaluate whether the change works or not, or whether it has any other side effects, or why it's necessary in the first place 🫣 |
Sorry, @bryanwweber ... if you look at the doxygen XML output that is generated for <briefdescription>
<para>Returns true if Cantera was compiled with C++ <computeroutput>HDF5</computeroutput> support. </para>
</briefdescription>
Before this fix, doxygen (or Jinja2?) cut off like so: as the XML tags hadn't been removed. PS: I updated the code to better document what is going on. |
ed042ff to
28f013e
Compare
|
Thanks for the detailed explanation! I think I understand a little bit better now. I'm going to ask some questions/speculation still from my ignorance, so I'm not asking for any changes or further investigation in this PR! @speth feel free to approve and merge if this looks good.
I see, I wonder if there's a way to pass the XML output to Doxygen when building docs for the generated code to say, this is the source for the docstrings of the generated files? That would avoid needing to copy the strings around.
If Jinja2 is responsible for this, it's probably due to somehow escaping the reserved HTML characters. Is Doxygen XML valid in docstrings in the main source code? If not, Doxygen may indeed be at fault... |
|
@bryanwweber … The legacy (hand-coded) CLib will be removed after 3.2. See https://cantera.org/dev/clib/index.html |
bryanwweber
left a comment
There was a problem hiding this comment.
Sorry @ischoegl I think I'm not being clear, but that's on me. I'm asking questions here since 1) I don't think we found the root cause of this problem and 2) I really don't like editing XML with regex 😬 In any case, this seems to work for the job that it has, so it looks good to me!
|
@bryanwweber ... I am 99% certain that Jinja2 swallows the output, as the C++ headers generated from their templates cut off after the first XML tag. As we need markdown for doxygen anyways, there's no need to further investigate. I certainly see the point of XML/regex, but the editing only touches what I consider terminal nodes. Any of the XML formatting tags that are replaced only apply to those terminal nodes. |
Changes proposed in this pull request
Fix issues where XML markup causes docstrings extracted by sourcegen to cut off (
<bold>,<emphasis>,<computeroutput>).Checklist
scons build&scons test) and unit tests address code coverage