Skip to content

Commit 35b3293

Browse files
XhmikosRxzyfer
authored andcommitted
Assorted typo fixes. (#2986)
1 parent b894c52 commit 35b3293

22 files changed

+33
-33
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sudo: required
1414
# this will still catch all coding errors!
1515
# - AUTOTOOLS=yes COVERAGE=no BUILD=static
1616

17-
# currenty there are various issues when
17+
# currently there are various issues when
1818
# built with coverage, clang and autotools
1919
# - AUTOTOOLS=yes COVERAGE=yes BUILD=shared
2020

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cache:
2323
- C:\Ruby%ruby_version%\lib\ruby\gems
2424
- C:\mingw64
2525

26-
# Uncomment to debug hanging builds via RDP, password can ve found/set under Environment-Variables in appveyor settings!
26+
# Uncomment to debug hanging builds via RDP, password can be found/set under Environment-Variables in appveyor settings!
2727
#
2828
# init:
2929
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

docs/api-context-example.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main( int argc, const char* argv[] )
1212
char* text = sass_copy_c_string("a{b:c;}");
1313
// Normally you'll load data into a buffer from i.e. the disk.
1414
// Use `sass_alloc_memory` to get a buffer to pass to LibSass
15-
// then fill it with data you load from disk or somwhere else.
15+
// then fill it with data you load from disk or somewhere else.
1616

1717
// create the data context and get all related structs
1818
struct Sass_Data_Context* data_ctx = sass_make_data_context(text);

docs/custom-functions-internal.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ union Sass_Value* call_sass_function(
3939

4040
### cookie
4141

42-
The cookie can hold any pointer you want. In the `perl-libsass` implementation it holds the structure with the reference of the actual registered callback into the perl interpreter. Before that call `perl-libsass` will convert all `Sass_Values` to corresponding perl data types (so they can be used natively inside the perl interpretor). The callback can also return a `Sass_Value`. In `perl-libsass` the actual function returns a perl value, which has to be converted before `libsass` can work with it again!
42+
The cookie can hold any pointer you want. In the `perl-libsass` implementation it holds the structure with the reference of the actual registered callback into the perl interpreter. Before that call `perl-libsass` will convert all `Sass_Values` to corresponding perl data types (so they can be used natively inside the perl interpreter). The callback can also return a `Sass_Value`. In `perl-libsass` the actual function returns a perl value, which has to be converted before `libsass` can work with it again!
4343

4444
## Sass_Values
4545

src/ast_sel_unify.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Sass {
1111
// elements that are matched by both [complex1] and [complex2].
1212
// If no such list can be produced, returns `null`.
1313
// ##########################################################################
14-
// ToDo: fine-tune API to avoid unecessary wrapper allocations
14+
// ToDo: fine-tune API to avoid unnecessary wrapper allocations
1515
// ##########################################################################
1616
std::vector<std::vector<SelectorComponentObj>> unifyComplex(
1717
const std::vector<std::vector<SelectorComponentObj>>& complexes)

src/ast_selectors.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ namespace Sass {
273273

274274
// Returns true if the first components
275275
// is a compound selector and fullfills
276-
// a few other criterias.
276+
// a few other criteria.
277277
bool isInvisible() const;
278278

279279
size_t hash() const override;
@@ -410,7 +410,7 @@ namespace Sass {
410410
CompoundSelector(ParserState pstate, bool postLineBreak = false);
411411

412412
// Returns true if this compound selector
413-
// fullfills various criterias.
413+
// fullfills various criteria.
414414
bool isInvisible() const;
415415

416416
bool empty() const override {

src/ast_values.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ namespace Sass {
536536
l.normalize(); r.normalize();
537537
Units &lhs_unit = l, &rhs_unit = r;
538538
if (!(lhs_unit == rhs_unit)) {
539-
/* ToDo: do we always get usefull backtraces? */
539+
/* ToDo: do we always get useful backtraces? */
540540
throw Exception::IncompatibleUnits(rhs, *this);
541541
}
542542
if (lhs_unit == rhs_unit) {

src/bind.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ namespace Sass {
168168
}
169169
// consumed parameter
170170
++ip;
171-
// no more paramaters
171+
// no more parameters
172172
break;
173173
}
174174

src/context.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ namespace Sass {
377377
// if (protocol.compare("file") && true) { }
378378
}
379379

380-
// add urls (protocol other than file) and urls without procotol to `urls` member
380+
// add urls (protocol other than file) and urls without protocol to `urls` member
381381
// ToDo: if ctx_path is already a file resource, we should not add it here?
382382
if (imp->import_queries() || protocol != "file" || imp_path.substr(0, 2) == "//") {
383383
imp->urls().push_back(SASS_MEMORY_NEW(String_Quoted, imp->pstate(), load_path));
@@ -501,7 +501,7 @@ namespace Sass {
501501
OutputBuffer emitted = emitter.get_buffer();
502502
// should we append a source map url?
503503
if (!c_options.omit_source_map_url) {
504-
// generate an embeded source map
504+
// generate an embedded source map
505505
if (c_options.source_map_embed) {
506506
emitted.buffer += linefeed;
507507
emitted.buffer += format_embedded_source_map();

src/cssize.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ namespace Sass {
148148
// this can return a string schema
149149
// string schema is not a statement!
150150
// r->block() is already a string schema
151-
// and that is comming from propset expand
151+
// and that is coming from propset expand
152152
Block* bb = operator()(r->block());
153153
// this should protect us (at least a bit) from our mess
154154
// fixing this properly is harder that it should be ...

src/eval.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ namespace Sass {
916916
return nr.detach();
917917
}
918918
else {
919-
// Special cases: +/- variables which evaluate to null ouput just +/-,
919+
// Special cases: +/- variables which evaluate to null output just +/-,
920920
// but +/- null itself outputs the string
921921
if (operand->concrete_type() == Expression::NULL_VAL && Cast<Variable>(u->operand())) {
922922
u->operand(SASS_MEMORY_NEW(String_Quoted, u->pstate(), ""));

src/extender.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ namespace Sass {
8282

8383
// ##########################################################################
8484
// Shared backtraces with context and expander. Needed the throw
85-
// errors when e.g. extending accross media query boundaries.
85+
// errors when e.g. extending across media query boundaries.
8686
// ##########################################################################
8787
Backtraces& traces;
8888

src/file.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ namespace Sass {
118118
return path[i] == '/';
119119
}
120120

121-
// helper function to find the last directory seperator
121+
// helper function to find the last directory separator
122122
inline size_t find_last_folder_separator(const std::string& path, size_t limit = std::string::npos)
123123
{
124124
size_t pos;

src/file.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace Sass {
104104
public:
105105
// the file contents
106106
char* contents;
107-
// conected sourcemap
107+
// connected sourcemap
108108
char* srcmap;
109109
public:
110110
Resource(char* contents, char* srcmap)

src/memory/SharedPtr.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ namespace Sass {
5555
// allocate additional control blocks and/or the need to dereference two
5656
// pointers on each operation. This can be optimized in `std::shared_ptr`
5757
// too by using `std::make_shared` (where the control block and the actual
58-
// object are allocated in one continous memory block via one single call).
58+
// object are allocated in one continuous memory block via one single call).
5959
class SharedObj {
6060
public:
6161
SharedObj() : refcount(0), detached(false) {

src/operation.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ namespace Sass {
127127
// example: Operation_CRTP<Expression*, Eval>
128128
// T is the base return type of all visitors
129129
// D is the class derived visitor class
130-
// normaly you want to implement all operators
130+
// normally you want to implement all operators
131131
template <typename T, typename D>
132132
class Operation_CRTP : public Operation<T> {
133133
public:

src/parser.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ namespace Sass {
565565

566566
// process until end
567567
while (i < end_of_selector) {
568-
// try to parse mutliple interpolants
568+
// try to parse multiple interpolants
569569
if (const char* p = find_first_in_interval< exactly<hash_lbrace>, block_comment >(i, end_of_selector)) {
570570
// accumulate the preceding segment if the position has advanced
571571
if (i < p) {
@@ -1187,7 +1187,7 @@ namespace Sass {
11871187
Expression_Obj lhs = parse_operators();
11881188
// if it's a singleton, return it (don't wrap it)
11891189
if (!(peek_css< exactly<'+'> >(position) ||
1190-
// condition is a bit misterious, but some combinations should not be counted as operations
1190+
// condition is a bit mysterious, but some combinations should not be counted as operations
11911191
(peek< no_spaces >(position) && peek< sequence< negate< unsigned_number >, exactly<'-'>, negate< space > > >(position)) ||
11921192
(peek< sequence< negate< unsigned_number >, exactly<'-'>, negate< unsigned_number > > >(position))) ||
11931193
peek< sequence < zero_plus < exactly <'-' > >, identifier > >(position))
@@ -2639,7 +2639,7 @@ namespace Sass {
26392639
rv.error = q;
26402640
rv.position = q;
26412641
// check expected opening bracket
2642-
// only after successfull matching
2642+
// only after successful matching
26432643
if (peek < exactly<'{'> >(q)) rv.found = q;
26442644
// else if (peek < end_of_file >(q)) rv.found = q;
26452645
else if (peek < exactly<'('> >(q)) rv.found = q;

src/parser.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ namespace Sass {
188188
// update after_token position for current token
189189
after_token.add(it_before_token, it_after_token);
190190

191-
// ToDo: could probably do this incremetal on original object (API wants offset?)
191+
// ToDo: could probably do this incremental on original object (API wants offset?)
192192
pstate = ParserState(path, source, lexed, before_token, after_token - before_token);
193193

194194
// advance internal char iterator

src/sass2scss.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ namespace Sass
467467
// right trim input
468468
sass = rtrim(sass);
469469

470-
// get postion of first meaningfull character in string
470+
// get position of first meaningfull character in string
471471
size_t pos_left = sass.find_first_not_of(SASS2SCSS_FIND_WHITESPACE);
472472

473473
// special case for final run
@@ -557,7 +557,7 @@ namespace Sass
557557
// default to a selector
558558
// change back if property found
559559
converter.selector = true;
560-
// get postion of first whitespace char
560+
// get position of first whitespace char
561561
size_t pos_wspace = sass.find_first_of(SASS2SCSS_FIND_WHITESPACE, pos_left);
562562
// assertion check for valid result
563563
if (pos_wspace != std::string::npos)
@@ -580,7 +580,7 @@ namespace Sass
580580
// assertion for valid result
581581
if (pos_colon != std::string::npos)
582582
{
583-
// ... after the first word (skip begining colons)
583+
// ... after the first word (skip beginning colons)
584584
pos_colon = sass.find_first_of(":", pos_colon);
585585
// it is a selector if there was no colon found
586586
converter.selector = pos_colon == std::string::npos;
@@ -758,7 +758,7 @@ namespace Sass
758758
scss += flush(sass, converter);
759759
}
760760

761-
// get postion of last meaningfull char
761+
// get position of last meaningfull char
762762
size_t pos_right = sass.find_last_not_of(SASS2SCSS_FIND_WHITESPACE);
763763

764764
// check for invalid result

src/sass_context.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ extern "C" {
399399
return data_ctx->error_status;
400400
try {
401401
if (data_ctx->source_string == 0) { throw(std::runtime_error("Data context has no source string")); }
402-
// empty source string is a valid case, even if not really usefull (different than with file context)
402+
// empty source string is a valid case, even if not really useful (different than with file context)
403403
// if (*data_ctx->source_string == 0) { throw(std::runtime_error("Data context has empty source string")); }
404404
}
405405
catch (...) { return handle_errors(data_ctx) | 1; }
@@ -481,7 +481,7 @@ extern "C" {
481481
static void sass_clear_options (struct Sass_Options* options)
482482
{
483483
if (options == 0) return;
484-
// Deallocate custom functions, headers and importes
484+
// Deallocate custom functions, headers and imports
485485
sass_delete_function_list(options->c_functions);
486486
sass_delete_importer_list(options->c_importers);
487487
sass_delete_importer_list(options->c_headers);
@@ -604,7 +604,7 @@ extern "C" {
604604
void ADDCALL sass_file_context_set_options (struct Sass_File_Context* ctx, struct Sass_Options* opt) { copy_options(ctx, opt); }
605605
void ADDCALL sass_data_context_set_options (struct Sass_Data_Context* ctx, struct Sass_Options* opt) { copy_options(ctx, opt); }
606606

607-
// Getters for Sass_Compiler options (get conected sass context)
607+
// Getters for Sass_Compiler options (get connected sass context)
608608
enum Sass_Compiler_State ADDCALL sass_compiler_get_state(struct Sass_Compiler* compiler) { return compiler->state; }
609609
struct Sass_Context* ADDCALL sass_compiler_get_context(struct Sass_Compiler* compiler) { return compiler->c_ctx; }
610610
struct Sass_Options* ADDCALL sass_compiler_get_options(struct Sass_Compiler* compiler) { return compiler->c_ctx; }

src/sass_functions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ extern "C" {
101101
}
102102

103103
// Creator for a single import entry returned by the custom importer inside the list
104-
// We take ownership of the memory for source and srcmap (freed when context is destroyd)
104+
// We take ownership of the memory for source and srcmap (freed when context is destroyed)
105105
Sass_Import_Entry ADDCALL sass_make_import(const char* imp_path, const char* abs_path, char* source, char* srcmap)
106106
{
107107
Sass_Import* v = (Sass_Import*) calloc(1, sizeof(Sass_Import));

src/units.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ namespace Sass {
330330
// has the advantage that they will be pre-sorted
331331
std::map<std::string, int> exponents;
332332

333-
// initialize by summing up occurences in unit vectors
333+
// initialize by summing up occurrences in unit vectors
334334
// this will already cancel out equivalent units (e.q. px/px)
335335
for (size_t i = 0; i < iL; i ++) exponents[numerators[i]] += 1;
336336
for (size_t n = 0; n < nL; n ++) exponents[denominators[n]] -= 1;
@@ -396,7 +396,7 @@ namespace Sass {
396396
denominators.size() == 0;
397397
}
398398

399-
// this does not cover all cases (multiple prefered units)
399+
// this does not cover all cases (multiple preferred units)
400400
double Units::convert_factor(const Units& r) const
401401
{
402402

@@ -467,7 +467,7 @@ namespace Sass {
467467
{
468468
// get and increment afterwards
469469
const std::string r_den = *(r_den_it);
470-
// get possible converstion factor for units
470+
// get possible conversion factor for units
471471
double conversion = conversion_factor(l_den, r_den);
472472
// skip incompatible denominator
473473
if (conversion == 0) {

0 commit comments

Comments
 (0)