no-stack-dub-sack / apexdox-vs-code

A lightweight VS Code extension that makes documenting your Salesforce Apex files an easy, integrated experience.
Other
49 stars 7 forks source link

Bug in recursive directories - links do not go to subfolder #73

Closed dschach closed 1 year ago

dschach commented 1 year ago

ApexDox accurately finds the Apex classes in subfolders when I only specify the parent folder (yay!) but the links to the classes themselves from each method do not point to the correct URL.

Example:

no-stack-dub-sack commented 1 year ago

@dschach Thanks for the report - I'll look into this and fix it soon. Current workaround is just specifying both directories, right?

dschach commented 1 year ago

@no-stack-dub-sack Yes. Workaround is just doing what has always been done - or not specifying a path at all and only putting the parent directory in the config file. We lose the hyperlink, but that's not a huge loss.

no-stack-dub-sack commented 1 year ago

@dschach I know I'm not one to talk 😄, but let me know if you have a chance to check out the PR for this and confirm that it works on your end.

dschach commented 1 year ago

Very sorry to say that it went janky on things. The URL for the file has something recursive in it. Here is a class header generated HTML:

<td class="doc-page">

          <div class="section">

            <h2 class="class-title top-level-type" id="ActionPlansDeleteMultipleAPExtension">

              <a target="_blank" rel="noopener noreferrer" title="Go to source" class="source-link" href="https://github.com/SalesforceLabs/ActionPlansV4/blob/main/sfdx-source/LabsActionPlans/main/default/classes/sfdx-source/LabsActionPlans/main/default/classes/ActionPlansDeleteMultipleAPExtension.cls#L28">
                ActionPlansDeleteMultipleAPExtension
              </a>
            </h2>

and here is a method

<div class="method public">
                  <h4 class="method-title " id="ActionPlansDeleteMultipleAPExtension.ActionPlansDeleteMultipleAPExtension">

                    <a target="_blank" rel="noopener noreferrer" title="Go to source" class="source-link" href="https://github.com/SalesforceLabs/ActionPlansV4/blob/main/sfdx-source/LabsActionPlans/main/default/classes/sfdx-source/LabsActionPlans/main/default/classes/ActionPlansDeleteMultipleAPExtension.cls#L40">
                      ActionPlansDeleteMultipleAPExtension(stdSetController)
                    </a>
                  </h4>

This is my apexdox.yml file

- path: '${workspaceFolder}/sfdx-source/LabsActionPlans/main/default/classes'
      sourceUrl: https://github.com/SalesforceLabs/ActionPlansV4/blob/main/sfdx-source/LabsActionPlans/main/default/classes

Looks like this may turn into a game of whack-a-mole.

I'm working in a branch of a fork, but if you want to see what I see, you can look at https://github.com/dschach/ActionPlansV4/tree/docs/ApexDox-recursive

no-stack-dub-sack commented 1 year ago

Thanks @dschach! Moving this convo over to #74, see my reply there.