Skip to content

@example directive, consider skip/folder license header #4286

Description

@jonasfj

If embedding an example file with a license header.

Maybe we should have a heuristic or option to skip the header or use code folding to collapse the license header by default in generated documentation.

Heuristic, if:

  • The example is a file, not a region, and,
  • First line in the file is a comment with //, and
  • Th first comment block of // comments contains a "copyright" style thing

Then we consider it a license header...

Pana also already contains logic and stuff to do a much better license header detection, we could use that.

There is like a very limited number of actual license headers we'd want to detect anyways.

Action, either:

  • Strip the license header, or,
  • Collapse the license header like code folding in vscode.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions