Skip to content

feature: Not write or delete empty Link Sources #13

@rafmartom

Description

@rafmartom

CURRENT BEHAVIOUR

For the nature of many html pages , which are coded with the anchor links in view , many times we get something like this (example of py-docs.dan)

  5.  Data Structures <L=7l#d></L><I=7l#d>

This Link Source is empty , in the sense that it doesnt have any label.
Also it is pointing to the same line no , so it is useless.

EXPECTED BEHAVIOUR

We can inspect for all the Link Sources that have no label <L=1#1></L> and delete them upright
Though, it would be nice to actually do the following:

  • For the unlabelled Link Sources, if they point to the same line (so there is the ocurrence of <I=1#1> within the same line) delete them
  • For the unlabelled Link Sources that point to other place, Add a little label (Such as an arrow ->) so it can be used to navigate to that topic

Would be desirable that after doing process 1 , we coul determine if the Link Target is still in_use . Although that has to be done in the parsing process.
One idea is that when Parsing the Links-in use , have a counter of in_use , not just a False , True .
And if removed one of the Link Sources see if the Link Target is still in_use (decrease one that counter).
The difficulty of this last solution is that at the parsing time is not possible to establish of the Link Source and Link Target pair are on the same line_no , as they get grouped via seds commands . They can be in close line nos , but not exactly the same one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions