Skip to content

Commit

Permalink
Update markdown comparison to latest version.
Browse files Browse the repository at this point in the history
  • Loading branch information
dikmax committed Nov 10, 2015
1 parent 629554d commit 72fe75f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions benchmark/run.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ class MarkdownBenchmark extends BenchmarkBase {

// The benchmark code.
void run() {
markdown.markdownToHtml(data);
markdown.markdownToHtml(data, extensionSet: markdown.ExtensionSet.commonMark);
}
}

main() async {
// Using Pandoc documentation for benchmark
HttpClient client = new HttpClient();
HttpClientRequest request = await client.getUrl(Uri.parse('https://raw.githubusercontent.com/0xAX/linux-insides/master/mm/linux-mm-2.md'));
//HttpClientRequest request = await client.getUrl(Uri.parse('https://raw.githubusercontent.com/0xAX/linux-insides/master/mm/linux-mm-2.md'));
//HttpClientRequest request = await client.getUrl(Uri.parse('https://raw.githubusercontent.com/dikmax/dikmax.name/master/post/2014-04-13-vilnius.md'));
//HttpClientRequest request = await client.getUrl(Uri.parse('https://raw.githubusercontent.com/dikmax/md_proc/master/README.md'));
//HttpClientRequest request = await client.getUrl(Uri.parse('https://raw.githubusercontent.com/jgm/pandoc/master/README'));
HttpClientRequest request = await client.getUrl(Uri.parse('https://raw.githubusercontent.com/jgm/pandoc/master/README'));
HttpClientResponse response = await request.close();
String data = await response.transform(UTF8.decoder).join();
print("File length: ${data.length}");
Expand Down
3 changes: 0 additions & 3 deletions lib/markdown_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ class CommonMarkParser {

// All indent and spaces parsers accepts spaces to skip, and returns spaces
// that were actually skipped.
// TODO test all parsers that use skipNonindentSpaces, skipListNonindentSpaces, indentSpaces, atMostSpaces
// TODO rename indentSpaces => indent, atMostSpaces => atMostIndent
static final Parser<int> skipNonindentChars =
atMostIndent(tabStop - 1).notFollowedBy(whitespaceChar);
static final Parser<int> skipNonindentCharsFromAnyPosition =
Expand Down Expand Up @@ -1223,7 +1221,6 @@ class CommonMarkParser {
Parser<List<Inline>> get image => char('!') > _linkOrImage(false);
Parser<List<Inline>> get link => _linkOrImage(true);

// TODO test benchmark
static final Set<String> allowedSchemes = new Set<String>.from(<String>[
"coap",
"doi",
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
quiver: "^0.21.4"
dev_dependencies:
benchmark_harness: any
markdown: any
markdown: '>=0.9.0 <1.0.0'
test: any
linter: any
dart_coveralls: any
Expand Down

0 comments on commit 72fe75f

Please sign in to comment.