Skip to content

Commit 86ce025

Browse files
committed
dartdoc: Stop section-divider comments from getting absorbed into docs
Before this change, if you hover in your IDE over an identifier whose declaration happens to be the first one after one of these section dividers, the doc shown would begin with a long string of slashes. After all, the divider line did start with "///". The choice of "|" as the substitute was fairly arbitrary. I tried a space first, and felt it interrupted the divider too much and made it look like just another line of comments. Done with a bit of Perl and Git: $ perl -i -0pe 's,^\s*//\K(?=//),|,gm' $(git grep -l //// '*.dart')
1 parent 2321e89 commit 86ce025

File tree

6 files changed

+37
-37
lines changed

6 files changed

+37
-37
lines changed

lib/example/sticky_header.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,14 @@ class ExampleVerticalDouble extends StatelessWidget {
198198
}
199199
}
200200

201-
////////////////////////////////////////////////////////////////////////////
201+
//|//////////////////////////////////////////////////////////////////////////
202202
//
203203
// That's it!
204204
//
205205
// The rest of this file is boring infrastructure for navigating to the
206206
// different examples, and for having some content to put inside them.
207207
//
208-
////////////////////////////////////////////////////////////////////////////
208+
//|//////////////////////////////////////////////////////////////////////////
209209

210210
class WideHeader extends StatelessWidget {
211211
const WideHeader({super.key, required this.i});

lib/model/content.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ class GlobalTimeNode extends InlineContentNode {
10161016
}
10171017
}
10181018

1019-
////////////////////////////////////////////////////////////////
1019+
//|//////////////////////////////////////////////////////////////
10201020

10211021
/// Parser for the inline-content subtrees within Zulip content HTML.
10221022
///

lib/model/store.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ abstract class PerAccountStoreBase {
369369
@protected
370370
final CorePerAccountStore core;
371371

372-
////////////////////////////////
372+
//|//////////////////////////////
373373
// Where data comes from in the first place.
374374

375375
GlobalStore get _globalStore => core._globalStore;
@@ -378,7 +378,7 @@ abstract class PerAccountStoreBase {
378378

379379
String get queueId => core.queueId;
380380

381-
////////////////////////////////
381+
//|//////////////////////////////
382382
// Data attached to the realm or the server.
383383

384384
/// Always equal to `account.realmUrl` and `connection.realmUrl`.
@@ -395,7 +395,7 @@ abstract class PerAccountStoreBase {
395395

396396
String get zulipVersion => account.zulipVersion;
397397

398-
////////////////////////////////
398+
//|//////////////////////////////
399399
// Data attached to the self-account on the realm.
400400

401401
int get accountId => core.accountId;
@@ -536,10 +536,10 @@ class PerAccountStore extends PerAccountStoreBase with
536536
_channels = channels,
537537
_messages = messages;
538538

539-
////////////////////////////////////////////////////////////////
539+
//|//////////////////////////////////////////////////////////////
540540
// Data.
541541

542-
////////////////////////////////
542+
//|//////////////////////////////
543543
// Where data comes from in the first place.
544544

545545
UpdateMachine? get updateMachine => _updateMachine;
@@ -559,7 +559,7 @@ class PerAccountStore extends PerAccountStoreBase with
559559
notifyListeners();
560560
}
561561

562-
////////////////////////////////
562+
//|//////////////////////////////
563563
// Data attached to the realm or the server.
564564

565565
// (User groups come before even realm settings,
@@ -574,7 +574,7 @@ class PerAccountStore extends PerAccountStoreBase with
574574
RealmStore get realmStore => _realm;
575575
final RealmStoreImpl _realm;
576576

577-
////////////////////////////////
577+
//|//////////////////////////////
578578
// The realm's repertoire of available emoji.
579579

580580
@override
@@ -604,7 +604,7 @@ class PerAccountStore extends PerAccountStoreBase with
604604

605605
EmojiStoreImpl _emoji;
606606

607-
////////////////////////////////
607+
//|//////////////////////////////
608608
// Data attached to the self-account on the realm.
609609

610610
final UserSettings userSettings;
@@ -615,7 +615,7 @@ class PerAccountStore extends PerAccountStoreBase with
615615

616616
final TypingNotifier typingNotifier;
617617

618-
////////////////////////////////
618+
//|//////////////////////////////
619619
// Users and data about them.
620620

621621
@override
@@ -693,7 +693,7 @@ class PerAccountStore extends PerAccountStoreBase with
693693
}
694694
}
695695

696-
////////////////////////////////
696+
//|//////////////////////////////
697697
// Streams, topics, and stuff about them.
698698

699699
@override
@@ -735,7 +735,7 @@ class PerAccountStore extends PerAccountStoreBase with
735735
}
736736
}
737737

738-
////////////////////////////////
738+
//|//////////////////////////////
739739
// Messages, and summaries of messages.
740740

741741
@override
@@ -797,13 +797,13 @@ class PerAccountStore extends PerAccountStoreBase with
797797

798798
final RecentSenders recentSenders;
799799

800-
////////////////////////////////
800+
//|//////////////////////////////
801801
// Other digests of data.
802802

803803
final AutocompleteViewManager autocompleteViewManager = AutocompleteViewManager();
804804

805805
// End of data.
806-
////////////////////////////////////////////////////////////////
806+
//|//////////////////////////////////////////////////////////////
807807

808808
/// Called when the app is reassembled during debugging, e.g. for hot reload.
809809
///

test/example_data.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void _checkPositive(int? value, String description) {
2525
assert(value == null || value > 0, '$description should be positive');
2626
}
2727

28-
////////////////////////////////////////////////////////////////
28+
//|//////////////////////////////////////////////////////////////
2929
// Error objects.
3030
//
3131

@@ -71,7 +71,7 @@ ZulipApiException apiExceptionUnauthorized({String routeName = 'someRoute'}) {
7171
data: {}, message: 'Invalid API key');
7272
}
7373

74-
////////////////////////////////////////////////////////////////
74+
//|//////////////////////////////////////////////////////////////
7575
// Time values.
7676
//
7777

@@ -85,7 +85,7 @@ int utcTimestamp([DateTime? dateTime]) {
8585
return dateTime.toUtc().millisecondsSinceEpoch ~/ 1000;
8686
}
8787

88-
////////////////////////////////////////////////////////////////
88+
//|//////////////////////////////////////////////////////////////
8989
// Realm-wide (or server-wide) metadata.
9090
//
9191

@@ -231,7 +231,7 @@ RealmEmojiItem realmEmojiItem({
231231
);
232232
}
233233

234-
////////////////////////////////////////////////////////////////
234+
//|//////////////////////////////////////////////////////////////
235235
// Users and accounts.
236236
//
237237

@@ -386,7 +386,7 @@ final Account otherAccount = account(
386386
apiKey: '6dxT4b73BYpCTU+i4BB9LAKC5h/CufqY', // A Zulip API key is 32 digits of base64.
387387
);
388388

389-
////////////////////////////////////////////////////////////////
389+
//|//////////////////////////////////////////////////////////////
390390
// Data attached to the self-account on the realm
391391
//
392392

@@ -408,7 +408,7 @@ SavedSnippet savedSnippet({
408408
);
409409
}
410410

411-
////////////////////////////////////////////////////////////////
411+
//|//////////////////////////////////////////////////////////////
412412
// Streams and subscriptions.
413413
//
414414

@@ -523,7 +523,7 @@ UserTopicItem userTopicItem(
523523
);
524524
}
525525

526-
////////////////////////////////////////////////////////////////
526+
//|//////////////////////////////////////////////////////////////
527527
// Messages, and pieces of messages.
528528
//
529529

@@ -867,7 +867,7 @@ Submessage submessage({
867867
);
868868
}
869869

870-
////////////////////////////////////////////////////////////////
870+
//|//////////////////////////////////////////////////////////////
871871
// Aggregate data structures.
872872
//
873873

@@ -902,7 +902,7 @@ UnreadMessagesSnapshot unreadMsgs({
902902
}
903903
const _unreadMsgs = unreadMsgs;
904904

905-
////////////////////////////////////////////////////////////////
905+
//|//////////////////////////////////////////////////////////////
906906
// Events.
907907
//
908908

@@ -1175,7 +1175,7 @@ ChannelUpdateEvent channelUpdateEvent(
11751175
);
11761176
}
11771177

1178-
////////////////////////////////////////////////////////////////
1178+
//|//////////////////////////////////////////////////////////////
11791179
// The entire per-account or global state.
11801180
//
11811181

test/flutter_checks.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'package:flutter/material.dart';
77
import 'package:flutter/rendering.dart';
88
import 'package:flutter/services.dart';
99

10-
////////////////////////////////////////////////////////////////
10+
//|//////////////////////////////////////////////////////////////
1111
// From the Flutter engine, i.e. from dart:ui.
1212
//
1313

@@ -40,15 +40,15 @@ extension FontVariationChecks on Subject<FontVariation> {
4040
Subject<double> get value => has((x) => x.value, 'value');
4141
}
4242

43-
////////////////////////////////////////////////////////////////
43+
//|//////////////////////////////////////////////////////////////
4444
// From 'package:flutter/foundation.dart'.
4545
//
4646

4747
extension ValueListenableChecks<T> on Subject<ValueListenable<T>> {
4848
Subject<T> get value => has((c) => c.value, 'value');
4949
}
5050

51-
////////////////////////////////////////////////////////////////
51+
//|//////////////////////////////////////////////////////////////
5252
// From 'package:flutter/services.dart'.
5353
//
5454

@@ -62,7 +62,7 @@ extension TextEditingValueChecks on Subject<TextEditingValue> {
6262
Subject<TextRange> get composing => has((x) => x.composing, 'composing');
6363
}
6464

65-
////////////////////////////////////////////////////////////////
65+
//|//////////////////////////////////////////////////////////////
6666
// From 'package:flutter/animation.dart'.
6767
//
6868

@@ -71,7 +71,7 @@ extension AnimationChecks<T> on Subject<Animation<T>> {
7171
Subject<T> get value => has((d) => d.value, 'value');
7272
}
7373

74-
////////////////////////////////////////////////////////////////
74+
//|//////////////////////////////////////////////////////////////
7575
// From 'package:flutter/painting.dart'.
7676
//
7777

@@ -97,7 +97,7 @@ extension InlineSpanChecks on Subject<InlineSpan> {
9797
Subject<TextStyle?> get style => has((x) => x.style, 'style');
9898
}
9999

100-
////////////////////////////////////////////////////////////////
100+
//|//////////////////////////////////////////////////////////////
101101
// From 'package:flutter/rendering.dart'.
102102
//
103103

@@ -110,7 +110,7 @@ extension RenderParagraphChecks on Subject<RenderParagraph> {
110110
Subject<bool> get didExceedMaxLines => has((x) => x.didExceedMaxLines, 'didExceedMaxLines');
111111
}
112112

113-
////////////////////////////////////////////////////////////////
113+
//|//////////////////////////////////////////////////////////////
114114
// From 'package:flutter/widgets.dart'.
115115
//
116116

@@ -192,7 +192,7 @@ extension PageRouteChecks<T> on Subject<PageRoute<T>> {
192192
Subject<bool> get fullscreenDialog => has((x) => x.fullscreenDialog, 'fullscreenDialog');
193193
}
194194

195-
////////////////////////////////////////////////////////////////
195+
//|//////////////////////////////////////////////////////////////
196196
// From 'package:flutter/material.dart'.
197197
//
198198

test/model/binding.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ class TestZulipBinding extends ZulipBinding {
422422
}
423423

424424
class FakeFirebaseMessaging extends Fake implements FirebaseMessaging {
425-
////////////////////////////////
425+
//|//////////////////////////////
426426
// Permissions.
427427

428428
NotificationSettings requestPermissionResult = const NotificationSettings(
@@ -471,7 +471,7 @@ class FakeFirebaseMessaging extends Fake implements FirebaseMessaging {
471471
return requestPermissionResult;
472472
}
473473

474-
////////////////////////////////
474+
//|//////////////////////////////
475475
// Tokens.
476476

477477
String? _initialToken;
@@ -527,7 +527,7 @@ class FakeFirebaseMessaging extends Fake implements FirebaseMessaging {
527527
}
528528
}
529529

530-
////////////////////////////////
530+
//|//////////////////////////////
531531
// Messages.
532532

533533
StreamController<RemoteMessage> onMessage = StreamController.broadcast();

0 commit comments

Comments
 (0)