Skip to content

Links with multiple underscores are not recognized #1481

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

Closed
sethladd opened this issue Aug 5, 2015 · 2 comments
Closed

Links with multiple underscores are not recognized #1481

sethladd opened this issue Aug 5, 2015 · 2 comments
Assignees
Labels
package:markdown type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@sethladd
Copy link
Contributor

sethladd commented Aug 5, 2015

Consider this code:

import 'package:markdown/markdown.dart' as md;

main() {
  String input = 'Hello [WORLD_TWO_UNDERSCORES] but this works [HELLO_WORLD]';

  md.Node _linkResolver(String name) {
    return new md.Text('XX $name XX');
  }

  print(md.markdownToHtml(input, linkResolver: _linkResolver));
}

Output:

<p>Hello [WORLD_TWO_UNDERSCORES] but this works XX HELLO_WORLD XX</p>

Expected:

<p>Hello XX WORLD_TWO_UNDERSCORES XX but this works XX HELLO_WORLD XX</p>

FWIW, If I remove new TagSyntax(r'_', tag: 'em'), from the top of inline_parser.dart, it works.

@sethladd
Copy link
Contributor Author

sethladd commented Aug 5, 2015

cc @keertip for FYI

@sethladd
Copy link
Contributor Author

sethladd commented Aug 5, 2015

Much appreciated! Thanks for the quick turnaround.

@kevmoo kevmoo added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jun 14, 2017
@mosuem mosuem transferred this issue from dart-archive/markdown Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:markdown type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants