Skip to content

Conversation

@jcollins-g
Copy link
Contributor

This fixes #1417 and prepares for #1388 with a new Documentable property, hasExtendedDocumentation.

@jcollins-g jcollins-g requested a review from devoncarew May 31, 2017 22:11
@googlebot googlebot added the cla: yes Google CLA check succeeded. label May 31, 2017
hasExtendedDocs = true;
if (!processFullDocs) break;
}
if (firstNode == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be firstNode ??= node

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

shortHtml = '';
}
}
if (!shortHtml.startsWith('<p>')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we doing this - is the the short html version doesn't convert as cleanly/consistently to html?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I have no idea -- I left it in because the old code did that and some of the tests seemed to verify it. However, I can see nothing that actually requires this -- docs look and browse OK even without these tags. Removing. This will trigger a large set of meaningless test package doc changes and test changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was curious - didn't realize it was pre-existing.

return document.renderLinesToHtml(lines, processFullDocs);
}

Documentation.forElement(this._element) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally put the ctors near the beginning of the class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, cut and pastyness got out of control. Reorged this class.

url: "https://pub.dartlang.org"
source: hosted
version: "0.11.2"
version: "0.11.3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to confirm, that we're not using new API from 0.11.3? (If so, we'll also need to bump the pubspec)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, not using any new APIs.

@devoncarew
Copy link
Contributor

lgtm! What's the performance improvement like?

@jcollins-g
Copy link
Contributor Author

Performance improves another 10-15% for generation. With this change, generation time is now dominated by the link checker when building docs for flutter; parallelizing parsing the HTML could cut us down another 40% in wall time.

@jcollins-g jcollins-g merged commit e2b63ff into master Jun 1, 2017
generatePackage();

for (var lib in package.libraries) {
//if (lib.name != 'flutter_test') continue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to commit this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gah. will fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Google CLA check succeeded.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dartdoc always parses full markdown even when it doesn't need to

4 participants