GoogleChrome / GoogleChrome/samples

output_helper.html - Initial Values Idea

Open
#230 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.9k
Forks
2.4k
Avg merge
24m
Merged PRs (30d)
2

Description

In a few samples we have code along the line of:

```
{% capture initial_output_content %}


Charging:

Time to charge:

Time to discharge:

Battery Level:

{% endcapture %}
{% include output_helper.html initial_output_content=initial_output_content %}
```

One thing I saw (and cleaned) in one of my PRs were people doing the following:

```
{% capture initial_output_content %}
{% endcapture %}
{% include output_helper.html initial_output_content=initial_output_content %}
```

I think this was just a misunderstanding of what this code was for.

One way to clean this up would be to make a custom tag and the output would be almost identical:

```
{% samplelogoutput %}


Charging:

Time to charge:

Time to discharge:

Battery Level:

{% endsamplelogoutput %}
```

and

```
{% samplelogoutput %}{% endsamplelogoutput %}
```

It's a minor thing but just wanted to see if this is worth it not.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.