Skip to content

remove the use of package:html from dartdoc #3064

Open
@devoncarew

Description

@devoncarew

We're trying to remove the SDK repo dep on package:html. It looks like this is the last thing consuming package:html from the SDK.

From looking at the code here, it looks like package:html is used for two things here:

Validating that links are correct in the generated html. Dartdoc generates html, and then optionally, re-parses that html and validates that it doesn't have urls pointing to files that don't exists. This feature is not enabled by default for the dart doc command (it's available as an option but off by default). Some options here are to remove the validation entirely, or, implement it before the dartdoc html generation phase (not rely on re-parsing the generated html).

Light modification of the html generated from markdown. It looks like what dartdoc is doing is 1) parsing markdown 2) generating html from that markdown (via a visitor) 3) validation of the generated html and tweaks to some of the generated html. I think this use of package:html could be replaced by slightly modifying the markdown => html visitor - doing validation and tree modifications there, instead of re-parsing the generated html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work ontype-tech-debtIssues that slow or block desirable development paths for Dartdoc, or create such problems for users

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions