Sdk: Parser wrongly creates CommentReference nodes for markdown links.

Created on 4 Jan 2018  路  9Comments  路  Source: dart-lang/sdk

_From @kevmoo on July 19, 2017 19:20_

the rfc link below shows us as broken.

SDK 1.25.0-dev.7.0

/// An implementation of [keyed-hash method authentication codes][rfc].
///
/// [rfc]: https://tools.ietf.org/html/rfc2104
///
/// HMAC allows messages to be cryptographically authenticated using any
/// iterated cryptographic hash function.
class Hmac extends Converter<List<int>, Digest> {
...
}

_Copied from original issue: dart-lang/linter#750_

P2 area-analyzer type-bug

All 9 comments

It looks like this is an issue that percolates up from the analyzer (its parser is treating [rfc] as a CommentReference node where it shouldn't). Fixing this properly would involve a repair there.

@kevmoo : can you provide context? Is this happening frequently? How common are links in dartdocs?

_From @kevmoo on December 31, 2017 21:52_

See https://travis-ci.org/dart-lang/markdown/jobs/323208414#L528

Three pretty valid examples in this file...

https://github.com/dart-lang/markdown/blob/0eb8ae2a23295666149f3df0b2b184869c189b82/lib/src/extension_set.dart#L16

@pq 鈥撀燾ould you open a bug in analyzer on this?

@bwilkerson, @scheglov : should I open a fresh bug or just move this one to the SDK repo?

_From @bwilkerson on January 3, 2018 21:51_

I think this is purely an analyzer issue, so moving it makes sense to me.

@bwilkerson, @scheglov: should this be moved to another component? (e.g., CFE?)

I don't expect the CFE to parse doc comments, so no.

I believe that this has been fixed. Please let us know if you're still seeing the described behavior.

This is still happening with wrapped links

  /// [color] may either be a [String], a [bool], or `null`. If it's a string,
  /// it indicates an [ANSI terminal color
  /// escape](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) that should

Also with link references

/// For more details see the source map [version 3 documentation][spec].
/// [spec]: https://docs.google.com/a/google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
Was this page helpful?
0 / 5 - 0 ratings