Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No automatic hyperlinking in HTML fragments #1467

Closed
Hixie opened this issue Jun 22, 2017 · 9 comments · Fixed by flutter/flutter#20721
Closed

No automatic hyperlinking in HTML fragments #1467

Hixie opened this issue Jun 22, 2017 · 9 comments · Fixed by flutter/flutter#20721
Labels
customer-flutter Issues originating from important to Flutter P2 A bug or feature request we're likely to work on

Comments

@Hixie
Copy link
Contributor

Hixie commented Jun 22, 2017

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.)

@Hixie Hixie added customer-flutter Issues originating from important to Flutter P2 A bug or feature request we're likely to work on labels Jun 22, 2017
@srawlins
Copy link
Member

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

@srawlins
Copy link
Member

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

@Hixie
Copy link
Contributor Author

Hixie commented Jul 11, 2017

@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

@srawlins
Copy link
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.

@Hixie
Copy link
Contributor Author

Hixie commented Jul 11, 2017

What does that mean? :-)

@Hixie
Copy link
Contributor Author

Hixie commented Jul 11, 2017

Also, what markdown spec?

@srawlins
Copy link
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]. |

@Hixie
Copy link
Contributor Author

Hixie commented Jul 11, 2017

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.

@srawlins
Copy link
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
Labels
customer-flutter Issues originating from important to Flutter P2 A bug or feature request we're likely to work on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants