Skip to content

No automatic hyperlinking in HTML fragments #1467

Closed
flutter/flutter
#20721

Description

@Hixie

The table in the following snippet fails to hyperlink the contents of the cells:

https://master-docs-flutter-io.firebaseapp.com/flutter/widgets/Element/updateChild.html

(I think our ideal solution would be to have some way to mark tables up in markdown instead of using HTML, for what it's worth.)

Activity

  1. added
    customer-flutterIssues originating from important to Flutter
    P2A bug or feature request we're likely to work on
    on Jun 22, 2017
  2. srawlins commented on Jul 11, 2017

    @srawlins
    Member

    The dartdoc package uses package:markdown, which mostly supports GitHub-flavored Markdown tables. Are these enabled in dartdocs?

  3. srawlins commented on Jul 11, 2017

    @srawlins
    Member

    @Hixie , I don't understand. I don't see a # fragment in your URL that you link...

  4. Hixie commented on Jul 11, 2017

    @Hixie
    ContributorAuthor

    @srawlins I literally meant "HTML fragment", as in, a fragment of HTML, not URL fragment identifiers.
    The source for the above is at: https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/framework.dart#L2557

  5. srawlins commented on Jul 11, 2017

    @srawlins
    Member

    Oh sorry. That's not part of the Markdown spec. You'll notice the backticks aren't converted to <code> either.

    If you use the GFM markdown syntax, it might work.

  6. Hixie commented on Jul 11, 2017

    @Hixie
    ContributorAuthor

    What does that mean? :-)

  7. Hixie commented on Jul 11, 2017

    @Hixie
    ContributorAuthor

    Also, what markdown spec?

  8. srawlins commented on Jul 11, 2017

    @srawlins
    Member

    The markdown package tries to follow the CommonMark spec, or, if you use ExtensionSet.gitHub (which I think dartdocs does... or at least should), the GFM spec.

    In this case, using GFM tables:

    |                 | `newWidget == null` | `newWidget != null`
    |-----------------|---------------------|-----------------------
    | `child == null` | Returns null.       | Returns new [Element].
    | `child != null` | Old child is removed, returns null. | Old child updated if possible, returns child or new [Element]. |
    
  9. Hixie commented on Jul 11, 2017

    @Hixie
    ContributorAuthor

    Pretty sure I tried that and it didn't work, and when I complained, I was told to use <table> markup. :-)
    There is a bug about supporting that: #1453

    BTW, dartdoc definitely doesn't follow that spec, at least not exclusively. In particular, hyperlinks to members aren't a syntax covered by that spec as far as I can tell. Nor are macros.

  10. srawlins commented on Jul 11, 2017

    @srawlins
    Member

    OK good, so there is a known issue.

    Yeah I guess custom link resolvers are a customization. We just allow shortcut reference links without a link reference definition, which then gets sent to a link resolver to answer "this might be a link. do you think it's a link? where should it point to?"

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

    P2A bug or feature request we're likely to work oncustomer-flutterIssues originating from important to Flutter

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions