diff options
author | Cary Clark <caryclark@google.com> | 2017-09-01 19:21:29 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-01 19:21:40 +0000 |
commit | e04038462747f409417435fee3c2b2c84ed7d651 (patch) | |
tree | da211a09324b8ae95646c7afaa4d658b7e5a8be7 /tools/bookmaker/mdOut.cpp | |
parent | 7b6d64ad8880226fcf0a8ffaab7e0afcfce74948 (diff) |
Revert "wip spelling mania"
This reverts commit da65a0489ae429f026bad32c9a0ef2010f40e175.
Reason for revert: fails to build on linux
Original change's description:
> wip spelling mania
>
> Work on spell-checker
> to identify errors and
> isolate more concepts
> requiring definitions.
>
> Docs-Preview: https://skia.org/?cl=41180
> TBR: reed@google.com
> Bug: skia: 6898
> Change-Id: I0759beb42eaf6095908a9bd7decfcd0026253609
> Reviewed-on: https://skia-review.googlesource.com/41180
> Reviewed-by: Cary Clark <caryclark@skia.org>
> Commit-Queue: Cary Clark <caryclark@skia.org>
TBR=caryclark@google.com,caryclark@skia.org
Change-Id: I173e50ea5b51273cd316ac9964af3a498b5300e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia: 6898
Reviewed-on: https://skia-review.googlesource.com/42140
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'tools/bookmaker/mdOut.cpp')
-rw-r--r-- | tools/bookmaker/mdOut.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/tools/bookmaker/mdOut.cpp b/tools/bookmaker/mdOut.cpp index 0a53fc4147..3718151e76 100644 --- a/tools/bookmaker/mdOut.cpp +++ b/tools/bookmaker/mdOut.cpp @@ -184,8 +184,7 @@ string MdOut::addReferences(const char* refStart, const char* refEnd, for (string prefix : { "_", "::" } ) { RootDefinition* root = test->asRoot(); string prefixed = root->fName + prefix + ref; - if (const Definition* def = root->find(prefixed, - RootDefinition::AllowParens::kYes)) { + if (const Definition* def = root->find(prefixed)) { result += linkRef(leadingSpaces, def, ref); goto found; } @@ -364,7 +363,7 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref, if (ref == fRoot->fName) { return fRoot; } - if (const Definition* definition = fRoot->find(ref, RootDefinition::AllowParens::kYes)) { + if (const Definition* definition = fRoot->find(ref)) { return definition; } Definition* test = fRoot; @@ -377,16 +376,14 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref, if (ref == leaf.first) { return leaf.second; } - const Definition* definition = leaf.second->find(ref, - RootDefinition::AllowParens::kYes); + const Definition* definition = leaf.second->find(ref); if (definition) { return definition; } } for (string prefix : { "::", "_" } ) { string prefixed = root->fName + prefix + ref; - if (const Definition* definition = root->find(prefixed, - RootDefinition::AllowParens::kYes)) { + if (const Definition* definition = root->find(prefixed)) { return definition; } if (isupper(prefixed[0])) { @@ -404,7 +401,7 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref, auto classIter = fBmhParser.fClassMap.find(className); if (classIter != fBmhParser.fClassMap.end()) { const RootDefinition& classDef = classIter->second; - const Definition* result = classDef.find(ref, RootDefinition::AllowParens::kYes); + const Definition* result = classDef.find(ref); if (result) { return result; } @@ -417,7 +414,7 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref, // try with a prefix if ('k' == ref[0]) { for (auto const& iter : fBmhParser.fEnumMap) { - if (iter.second.find(ref, RootDefinition::AllowParens::kYes)) { + if (iter.second.find(ref)) { return &iter.second; } } @@ -459,15 +456,13 @@ const Definition* MdOut::isDefined(const TextParser& parser, const string& ref, string className(ref, 0, pos); auto classIter = fBmhParser.fClassMap.find(className); if (classIter != fBmhParser.fClassMap.end()) { - if (const Definition* definition = classIter->second.find(ref, - RootDefinition::AllowParens::kYes)) { + if (const Definition* definition = classIter->second.find(ref)) { return definition; } } auto enumIter = fBmhParser.fEnumMap.find(className); if (enumIter != fBmhParser.fEnumMap.end()) { - if (const Definition* definition = enumIter->second.find(ref, - RootDefinition::AllowParens::kYes)) { + if (const Definition* definition = enumIter->second.find(ref)) { return definition; } } @@ -687,7 +682,7 @@ void MdOut::markTypeOut(Definition* def) { TextParser tp(def->fFileName, def->fStart, def->fContentStart, def->fLineCount); tp.skipExact("#Member"); tp.skipWhiteSpace(); - const char* end = tp.trimmedBracketEnd('\n'); + const char* end = tp.trimmedBracketEnd('\n', TextParser::OneLine::kYes); this->lfAlways(2); fprintf(fOut, "<a name=\"%s\"> <code><strong>%.*s</strong></code> </a>", def->fFiddle.c_str(), (int) (end - tp.fChar), tp.fChar); |