Skip to content

Commit

Permalink
Merge pull request #434 from dart-lang/property-readonly-bug
Browse files Browse the repository at this point in the history
Property readonly bug
  • Loading branch information
sethladd committed Apr 23, 2015
2 parents 91579dd + a42f1d8 commit bba42be
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/dartdoc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import 'src/model_utils.dart';
const String NAME = 'dartdoc';

// Update when pubspec version changes
const String VERSION = '0.0.1+5';
const String VERSION = '0.0.1+6';

/// Initialize and setup the generators
List<Generator> initGenerators(
Expand Down
4 changes: 3 additions & 1 deletion lib/resources.g.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// WARNING: This file is auto-generated.library resources;
// WARNING: This file is auto-generated.

library resources;

const List<String> RESOURCE_NAMES = const [
'package:dartdoc/resources/prettify.css',
Expand Down
3 changes: 2 additions & 1 deletion lib/src/html_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ class Templates {
'footer',
'head',
'property',
'styles_and_scripts'
'styles_and_scripts',
'readable_writable'
];
for (var partial in partials) {
_partialTemplates[partial] = await _loadPartial('_$partial.html');
Expand Down
6 changes: 1 addition & 5 deletions lib/templates/_property.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
<span class="returntype">{{{ linkedReturnType }}}</span>
</dt>
<dd>
<div class="readable-writable">
{{#readOnly}}read-only{{/readOnly}}
{{#writeOnly}}write-only{{/writeOnly}}
{{#readWrite}}read/write{{/readWrite}}
</div>
{{>readable_writable}}
{{#oneLiner}}{{ documentation }}{{/oneLiner}}
</dd>
5 changes: 5 additions & 0 deletions lib/templates/_readable_writable.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="readable-writable">
{{#readOnly}}read-only{{/readOnly}}
{{#writeOnly}}write-only{{/writeOnly}}
{{#readWrite}}read/write{{/readWrite}}
</div>
7 changes: 2 additions & 5 deletions lib/templates/property.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
{{#property}}
<span class="returntype">{{{ linkedReturnType }}}</span>
<span class="name">{{ name }}</span>

{{>readable_writable}}
{{/property}}
</section>

<div>
<span class="{{#property.hasGetter}}has-it{{/property.hasGetter}} getter">read</span>
<span class="{{#property.hasSetter}}has-it{{/property.hasSetter}} setter">write</span>
</div>

<section class="desc markdown">

{{#markdown}}
Expand Down
7 changes: 2 additions & 5 deletions lib/templates/top_level_property.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
{{#property}}
<span class="returntype">{{{ linkedReturnType }}}</span>
<span class="name">{{ name }}</span>

{{>readable_writable}}
{{/property}}
</section>

<div>
<span class="{{#property.hasGetter}}has-it{{/property.hasGetter}} getter">read</span>
<span class="{{#property.hasSetter}}has-it{{/property.hasSetter}} setter">write</span>
</div>

<section class="desc markdown">

{{#markdown}}
Expand Down

0 comments on commit bba42be

Please sign in to comment.