Skip to content

Commit

Permalink
Added a note about regexing leading zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
KittyGiraudel committed Aug 31, 2015
1 parent 6f6df33 commit a3f1313
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions en/_syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ Numbers should display leading zeros before a decimal value less than one. Never

{% include snippets/syntax/07/index.html %}

<div class="note">
<p>In Sublime Text and other editors providing a regular-expression powered search and replace, it is very easy to add a leading zero to (most if not all) float numbers. Simply replace <code>\s+\.(\d+)</code> with <code> 0.$1</code>. Do not forget the space before the <code>0</code> though.</p>
</div>

### Units

When dealing with lengths, a `0` value should never ever have a unit.
Expand Down

0 comments on commit a3f1313

Please sign in to comment.