Sha256: 25b681d56bad04eb2eb14cfaef901a11da41d9ad364705be1fa47b1f9e0e8729

Contents?: true

Size: 1.91 KB

Versions: 101

Compression:

Stored size: 1.91 KB

Contents

.Dd August 9, 2013
.Dt cssesc 1
.Sh NAME
.Nm cssesc
.Nd escape text for use in CSS string literals or identifiers
.Sh SYNOPSIS
.Nm
.Op Fl i | -identifier Ar string
.br
.Op Fl s | -single-quotes Ar string
.br
.Op Fl d | -double-quotes Ar string
.br
.Op Fl w | -wrap Ar string
.br
.Op Fl e | -escape-everything Ar string
.br
.Op Fl v | -version
.br
.Op Fl h | -help
.Sh DESCRIPTION
.Nm
escapes strings for use in CSS string literals or identifiers while generating the shortest possible valid ASCII-only output.
.Sh OPTIONS
.Bl -ohang -offset
.It Sy "-s, --single-quotes"
Escape any occurences of ' in the input string as \\', so that the output can be used in a CSS string literal wrapped in single quotes.
.It Sy "-d, --double-quotes"
Escape any occurences of " in the input string as \\", so that the output can be used in a CSS string literal wrapped in double quotes.
.It Sy "-w, --wrap"
Make sure the output is a valid CSS string literal wrapped in quotes. The type of quotes can be specified using the
.Ar -s | --single-quotes
or
.Ar -d | --double-quotes
settings.
.It Sy "-e, --escape-everything"
Escape all the symbols in the output, even printable ASCII symbols.
.It Sy "-v, --version"
Print cssesc's version.
.It Sy "-h, --help"
Show the help screen.
.El
.Sh EXIT STATUS
The
.Nm cssesc
utility exits with one of the following values:
.Pp
.Bl -tag -width flag -compact
.It Li 0
.Nm
successfully escaped the given text and printed the result.
.It Li 1
.Nm
wasn't instructed to escape anything (for example, the
.Ar --help
flag was set); or, an error occurred.
.El
.Sh EXAMPLES
.Bl -ohang -offset
.It Sy "cssesc 'foo bar baz'"
Print an escaped version of the given text.
.It Sy echo\ 'foo bar baz'\ |\ cssesc
Print an escaped version of the text that gets piped in.
.El
.Sh BUGS
cssesc's bug tracker is located at <https://github.com/mathiasbynens/cssesc/issues>.
.Sh AUTHOR
Mathias Bynens <https://mathiasbynens.be/>
.Sh WWW
<https://mths.be/cssesc>

Version data entries

101 entries across 65 versions & 12 rubygems

Version Path
trusty-cms-6.3.1 node_modules/cssesc/man/cssesc.1
boring_generators-0.15.0 tmp/templates/app_template/node_modules/cssesc/man/cssesc.1
boring_generators-0.14.0 tmp/templates/app_template/node_modules/cssesc/man/cssesc.1
optimacms-0.1.61 spec/dummy/node_modules/postcss-selector-parser/node_modules/cssesc/man/cssesc.1
optimacms-0.1.61 spec/dummy/node_modules/cssesc/man/cssesc.1
boring_generators-0.13.0 tmp/templates/app_template/node_modules/cssesc/man/cssesc.1
decidim-0.26.8 packages/eslint-config/node_modules/cssesc/man/cssesc.1
boring_generators-0.12.0 tmp/templates/app_template/node_modules/cssesc/man/cssesc.1
disco_app-0.18.0 test/dummy/node_modules/cssesc/man/cssesc.1
disco_app-0.18.0 test/dummy/node_modules/postcss-modules-scope/node_modules/cssesc/man/cssesc.1
disco_app-0.18.0 test/dummy/node_modules/postcss-modules-local-by-default/node_modules/cssesc/man/cssesc.1
disco_app-0.18.2 test/dummy/node_modules/postcss-modules-local-by-default/node_modules/cssesc/man/cssesc.1
disco_app-0.18.2 test/dummy/node_modules/postcss-modules-scope/node_modules/cssesc/man/cssesc.1
disco_app-0.18.2 test/dummy/node_modules/cssesc/man/cssesc.1
trusty-cms-5.0.7 node_modules/cssesc/man/cssesc.1
trusty-cms-5.0.6 node_modules/cssesc/man/cssesc.1
trusty-cms-5.0.5 node_modules/cssesc/man/cssesc.1
trusty-cms-5.0.4 node_modules/cssesc/man/cssesc.1
disco_app-0.16.1 test/dummy/node_modules/cssesc/man/cssesc.1
disco_app-0.16.1 test/dummy/node_modules/postcss-selector-parser/node_modules/cssesc/man/cssesc.1