Skip to content

Commit d9abd72

Browse files
committed
Update website
1 parent 68db113 commit d9abd72

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs/examples/data/globe.msx

0 Bytes
Binary file not shown.

docs/examples/data/us-states.msx

0 Bytes
Binary file not shown.

docs/guides/expressions.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ <h2 id="what-is-a-javascript-expression">What is a JavaScript expression?</h2>
8585
-each <span class="hljs-string">&#x27;SIZE = classify(POPULATION)&#x27;</span> \
8686
-o out.geojson
8787
</code></pre>
88-
<h2 id="quoting-expressions-in-the-shell">Quoting expressions in the shell</h2>
89-
<p>Expression arguments must be quoted in the shell. The most common style is single quotes, which prevent the shell from interpreting special characters inside the expression:</p>
88+
<h2 id="quoting-expressions">Quoting expressions</h2>
89+
<p>An expression containing spaces or special characters needs to be quoted, otherwise mapshaper will interpret the parts as separate arguments and produce a syntax error. Single quotes are the most common style:</p>
9090
<pre><code class="hljs language-bash">mapshaper data.geojson -filter <span class="hljs-string">&#x27;POPULATION &gt; 1000000&#x27;</span> -o out.geojson
9191
</code></pre>
9292
<p>If the expression itself contains single quotes — for example, a string literal — wrap it in double quotes instead, and vice versa:</p>
9393
<pre><code class="hljs language-bash">mapshaper data.geojson -filter <span class="hljs-string">&quot;TYPE == &#x27;inner&#x27;&quot;</span> -o out.geojson
9494
</code></pre>
9595
<p>Backtick quoting is also available as a third option when both single and double quotes appear in the expression.</p>
96-
<p>Backslash escapes (<code>\&quot;</code>, <code>\&#39;</code>) can also resolve quoting conflicts, but the shell processes them before passing the expression to mapshaper, which can strip the backslashes and produce a JS syntax error. This gets particularly confusing inside shell scripts and Makefiles, where an additional level of escaping may be needed. When possible, switching the outer quote style is simpler than relying on backslash escapes.</p>
96+
<p>Backslash escapes (<code>\&quot;</code>, <code>\&#39;</code>) can also resolve quoting conflicts, but when running commands in a shell the shell processes them before passing the expression to mapshaper, which can strip the backslashes and produce a JS syntax error. This gets particularly confusing inside shell scripts and Makefiles, where an additional level of escaping may be needed. When possible, switching the outer quote style is simpler than relying on backslash escapes.</p>
9797
<h2 id="where-expressions-appear">Where expressions appear</h2>
9898
<table>
9999
<thead>
@@ -636,7 +636,7 @@ <h2 id="see-also">See also</h2>
636636
</main>
637637

638638
<aside class="docs-toc">
639-
<div class="docs-toc-title">On this page</div><ul><li class="lvl-2"><a href="#what-is-a-javascript-expression">What is a JavaScript expression?</a></li><li class="lvl-2"><a href="#quoting-expressions-in-the-shell">Quoting expressions in the shell</a></li><li class="lvl-2"><a href="#where-expressions-appear">Where expressions appear</a></li><li class="lvl-2"><a href="#the-execution-context">The execution context</a></li><li class="lvl-3"><a href="#field-assignment">Field assignment</a></li><li class="lvl-3"><a href="#multiple-statements">Multiple statements</a></li><li class="lvl-2"><a href="#feature-properties-this">Feature properties (this)</a></li><li class="lvl-3"><a href="#all-layer-types">All layer types</a></li><li class="lvl-3"><a href="#polygon-polyline-and-point-layers-with-geometry">Polygon, polyline and point layers (with geometry)</a></li><li class="lvl-3"><a href="#polygon-only">Polygon-only</a></li><li class="lvl-3"><a href="#polyline-only">Polyline-only</a></li><li class="lvl-3"><a href="#point-only">Point-only</a></li><li class="lvl-2"><a href="#layer-level-properties-thislayer">Layer-level properties (this.layer)</a></li><li class="lvl-2"><a href="#helper-functions">Helper functions</a></li><li class="lvl-2"><a href="#calc-expressions">Calc expressions</a></li><li class="lvl-2"><a href="#pair-expressions-a-and-b">Pair expressions (A and B)</a></li><li class="lvl-2"><a href="#layer-level-expressions--if--define">Layer-level expressions (-if, -define)</a></li><li class="lvl-2"><a href="#template-expressions--run">Template expressions (-run)</a></li><li class="lvl-2"><a href="#loading-helpers">Loading helpers</a></li><li class="lvl-2"><a href="#sharing-state-across-commands">Sharing state across commands</a></li><li class="lvl-2"><a href="#common-pitfalls">Common pitfalls</a></li><li class="lvl-2"><a href="#examples">Examples</a></li><li class="lvl-2"><a href="#see-also">See also</a></li></ul>
639+
<div class="docs-toc-title">On this page</div><ul><li class="lvl-2"><a href="#what-is-a-javascript-expression">What is a JavaScript expression?</a></li><li class="lvl-2"><a href="#quoting-expressions">Quoting expressions</a></li><li class="lvl-2"><a href="#where-expressions-appear">Where expressions appear</a></li><li class="lvl-2"><a href="#the-execution-context">The execution context</a></li><li class="lvl-3"><a href="#field-assignment">Field assignment</a></li><li class="lvl-3"><a href="#multiple-statements">Multiple statements</a></li><li class="lvl-2"><a href="#feature-properties-this">Feature properties (this)</a></li><li class="lvl-3"><a href="#all-layer-types">All layer types</a></li><li class="lvl-3"><a href="#polygon-polyline-and-point-layers-with-geometry">Polygon, polyline and point layers (with geometry)</a></li><li class="lvl-3"><a href="#polygon-only">Polygon-only</a></li><li class="lvl-3"><a href="#polyline-only">Polyline-only</a></li><li class="lvl-3"><a href="#point-only">Point-only</a></li><li class="lvl-2"><a href="#layer-level-properties-thislayer">Layer-level properties (this.layer)</a></li><li class="lvl-2"><a href="#helper-functions">Helper functions</a></li><li class="lvl-2"><a href="#calc-expressions">Calc expressions</a></li><li class="lvl-2"><a href="#pair-expressions-a-and-b">Pair expressions (A and B)</a></li><li class="lvl-2"><a href="#layer-level-expressions--if--define">Layer-level expressions (-if, -define)</a></li><li class="lvl-2"><a href="#template-expressions--run">Template expressions (-run)</a></li><li class="lvl-2"><a href="#loading-helpers">Loading helpers</a></li><li class="lvl-2"><a href="#sharing-state-across-commands">Sharing state across commands</a></li><li class="lvl-2"><a href="#common-pitfalls">Common pitfalls</a></li><li class="lvl-2"><a href="#examples">Examples</a></li><li class="lvl-2"><a href="#see-also">See also</a></li></ul>
640640
</aside>
641641

642642
</div>

docs/guides/expressions.html.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ mapshaper data.geojson \
7777
-o out.geojson
7878
```
7979

80-
## Quoting expressions in the shell
80+
## Quoting expressions
8181

82-
Expression arguments must be quoted in the shell. The most common style is single quotes, which prevent the shell from interpreting special characters inside the expression:
82+
An expression containing spaces or special characters needs to be quoted, otherwise mapshaper will interpret the parts as separate arguments and produce a syntax error. Single quotes are the most common style:
8383

8484
```bash
8585
mapshaper data.geojson -filter 'POPULATION > 1000000' -o out.geojson
@@ -93,7 +93,7 @@ mapshaper data.geojson -filter "TYPE == 'inner'" -o out.geojson
9393

9494
Backtick quoting is also available as a third option when both single and double quotes appear in the expression.
9595

96-
Backslash escapes (`\"`, `\'`) can also resolve quoting conflicts, but the shell processes them before passing the expression to mapshaper, which can strip the backslashes and produce a JS syntax error. This gets particularly confusing inside shell scripts and Makefiles, where an additional level of escaping may be needed. When possible, switching the outer quote style is simpler than relying on backslash escapes.
96+
Backslash escapes (`\"`, `\'`) can also resolve quoting conflicts, but when running commands in a shell the shell processes them before passing the expression to mapshaper, which can strip the backslashes and produce a JS syntax error. This gets particularly confusing inside shell scripts and Makefiles, where an additional level of escaping may be needed. When possible, switching the outer quote style is simpler than relying on backslash escapes.
9797

9898
## Where expressions appear
9999

llms-full.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,9 +2333,9 @@ mapshaper data.geojson \
23332333
-o out.geojson
23342334
```
23352335

2336-
## Quoting expressions in the shell
2336+
## Quoting expressions
23372337

2338-
Expression arguments must be quoted in the shell. The most common style is single quotes, which prevent the shell from interpreting special characters inside the expression:
2338+
An expression containing spaces or special characters needs to be quoted, otherwise mapshaper will interpret the parts as separate arguments and produce a syntax error. Single quotes are the most common style:
23392339

23402340
```bash
23412341
mapshaper data.geojson -filter 'POPULATION > 1000000' -o out.geojson
@@ -2349,7 +2349,7 @@ mapshaper data.geojson -filter "TYPE == 'inner'" -o out.geojson
23492349

23502350
Backtick quoting is also available as a third option when both single and double quotes appear in the expression.
23512351

2352-
Backslash escapes (`\"`, `\'`) can also resolve quoting conflicts, but the shell processes them before passing the expression to mapshaper, which can strip the backslashes and produce a JS syntax error. This gets particularly confusing inside shell scripts and Makefiles, where an additional level of escaping may be needed. When possible, switching the outer quote style is simpler than relying on backslash escapes.
2352+
Backslash escapes (`\"`, `\'`) can also resolve quoting conflicts, but when running commands in a shell the shell processes them before passing the expression to mapshaper, which can strip the backslashes and produce a JS syntax error. This gets particularly confusing inside shell scripts and Makefiles, where an additional level of escaping may be needed. When possible, switching the outer quote style is simpler than relying on backslash escapes.
23532353

23542354
## Where expressions appear
23552355

0 commit comments

Comments
 (0)