Skip to content

Commit

Permalink
[DO NOT MERGE] Run npm run build with gfm
Browse files Browse the repository at this point in the history
Uh oh...

**Nunjucks whitespace issue**

It looks like we're running foul of GFM's "HTML blocks" rules: https://github.github.com/gfm/#html-blocks

Specifically number 6 and potentially 7, which have blank lines as an end condition.

"Cleaning up" the nunjucks results by smooshing all the empty lines that cause issues results in far less readable code, so it'd be preferable to figure out if there's another way.

I've tried using Nunjucks whitespace control (ie: the minus sign), but that doesn't solve the problem

**Build time seems significantly slower**

Build time with marked set to `gfm` seems much slower. That could be due to the whitespace issue and all the faffy formatting its doing though.
  • Loading branch information
domoscargin committed Sep 1, 2022
1 parent 6db63ac commit 8bae063
Show file tree
Hide file tree
Showing 64 changed files with 40,822 additions and 41,295 deletions.
29 changes: 15 additions & 14 deletions deploy/public/community/contribution-criteria/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1063,24 +1063,25 @@ <h2 id="developing-a-component-or-pattern">Developing a component or pattern</h2
<th scope="row" class="govuk-table__header">Usable</th>
<td class="govuk-table__cell"><p>It has been tested in user research and shown to work with a representative sample of users, including those with disabilities.</p>

<p class='govuk-!-margin-bottom-0'>Components and patterns which are not proven usable can be published as experimental. But they must be clearly based on relevant user research from other organisations and best practice, and meet the other criteria.</p></td>
</tr>
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">Consistent</th>
<td class="govuk-table__cell"><p>It reuses existing styles and components in the Design System where relevant.</p>
<pre><code>&lt;p <span class="hljs-keyword">class</span>=<span class="hljs-comment">&#x27;govuk-!-margin-bottom-0&#x27;&gt;Components and patterns which are not proven usable can be published as experimental. But they must be clearly based on relevant user research from other organisations and best practice, and meet the other criteria.<span class="hljs-doctag">&lt;/p&gt;</span><span class="hljs-doctag">&lt;/td&gt;</span></span>
&lt;/tr&gt;
&lt;tr <span class="hljs-keyword">class</span>=<span class="hljs-string">&quot;govuk-table__row&quot;</span>&gt;
&lt;th scope=<span class="hljs-string">&quot;row&quot;</span> <span class="hljs-keyword">class</span>=<span class="hljs-string">&quot;govuk-table__header&quot;</span>&gt;Consistent&lt;/th&gt;
&lt;td <span class="hljs-keyword">class</span>=<span class="hljs-string">&quot;govuk-table__cell&quot;</span>&gt;&lt;p&gt;It reuses existing styles <span class="hljs-keyword">and</span> components <span class="hljs-keyword">in</span> the Design System <span class="hljs-keyword">where</span> relevant.&lt;/p&gt;

<p>Both the guidance and any content included in examples must follow the <a href='https://www.gov.uk/guidance/style-guide/a-to-z-of-gov-uk-style'>GOV.UK content style guide</a>.</p>
&lt;p&gt;Both the guidance <span class="hljs-keyword">and</span> any content included <span class="hljs-keyword">in</span> examples must follow the &lt;a href=<span class="hljs-comment">&#x27;https://www.gov.uk/guidance/style-guide/a-to-z-of-gov-uk-style&#x27;&gt;GOV.UK content style guide<span class="hljs-doctag">&lt;/a&gt;</span>.<span class="hljs-doctag">&lt;/p&gt;</span></span>

<p class='govuk-!-margin-bottom-0'>If there is code, it follows the <a href='https://github.com/alphagov/govuk-frontend/blob/main/CONTRIBUTING.md#conventions-to-follow'>GOV.UK Frontend coding standards</a> and is ready to merge in GOV.UK Frontend.</p></td>
</tr>
<tr class="govuk-table__row">
<th scope="row" class="govuk-table__header">Versatile</th>
<td class="govuk-table__cell"><p>The implementation is versatile enough that the component or pattern can be used in a range of different services that may need it.</p>
&lt;p <span class="hljs-keyword">class</span>=<span class="hljs-comment">&#x27;govuk-!-margin-bottom-0&#x27;&gt;If there is code, it follows the <span class="hljs-doctag">&lt;a href=&#x27;https://github.com/alphagov/govuk-frontend/blob/main/CONTRIBUTING.md#conventions-to-follow&#x27;&gt;</span>GOV.UK Frontend coding standards<span class="hljs-doctag">&lt;/a&gt;</span> and is ready to merge in GOV.UK Frontend.<span class="hljs-doctag">&lt;/p&gt;</span><span class="hljs-doctag">&lt;/td&gt;</span></span>
&lt;/tr&gt;
&lt;tr <span class="hljs-keyword">class</span>=<span class="hljs-string">&quot;govuk-table__row&quot;</span>&gt;
&lt;th scope=<span class="hljs-string">&quot;row&quot;</span> <span class="hljs-keyword">class</span>=<span class="hljs-string">&quot;govuk-table__header&quot;</span>&gt;Versatile&lt;/th&gt;
&lt;td <span class="hljs-keyword">class</span>=<span class="hljs-string">&quot;govuk-table__cell&quot;</span>&gt;&lt;p&gt;The implementation <span class="hljs-keyword">is</span> versatile enough that the component <span class="hljs-keyword">or</span> pattern can be used <span class="hljs-keyword">in</span> a range <span class="hljs-keyword">of</span> different services that may need it.&lt;/p&gt;

<p>For example, a versatile date input component could be set up to ask for a year only, a month and year only, a precise date, or any other combination you may need.</p>
&lt;p&gt;<span class="hljs-keyword">For</span> example, a versatile <span class="hljs-built_in">date</span> input component could be <span class="hljs-keyword">set</span> up <span class="hljs-keyword">to</span> ask <span class="hljs-keyword">for</span> a year only, a month <span class="hljs-keyword">and</span> year only, a precise <span class="hljs-built_in">date</span>, <span class="hljs-keyword">or</span> any other combination you may need.&lt;/p&gt;

<p class='govuk-!-margin-bottom-0'>The component or pattern must also have been tested and shown to work with a range of <a href='https://www.gov.uk/service-manual/technology/designing-for-different-browsers-and-devices'>browsers, assistive technologies and devices</a>.</p></td>
</tr>
&lt;p <span class="hljs-keyword">class</span>=<span class="hljs-comment">&#x27;govuk-!-margin-bottom-0&#x27;&gt;The component or pattern must also have been tested and shown to work with a range of <span class="hljs-doctag">&lt;a href=&#x27;https://www.gov.uk/service-manual/technology/designing-for-different-browsers-and-devices&#x27;&gt;</span>browsers, assistive technologies and devices<span class="hljs-doctag">&lt;/a&gt;</span>.<span class="hljs-doctag">&lt;/p&gt;</span><span class="hljs-doctag">&lt;/td&gt;</span></span>
&lt;/tr&gt;
</code></pre>
</tbody>
</table>

Expand Down
Loading

0 comments on commit 8bae063

Please sign in to comment.