diff --git a/README/CODESTYLE.md b/README/CODESTYLE.md index 3debd14..1d58c44 100644 --- a/README/CODESTYLE.md +++ b/README/CODESTYLE.md @@ -16,7 +16,7 @@ From reading of the Tidy source, some things are self evident, in no particular - Use of 4-space indenting, and no tabs. - No C++ single line comments using `//`. - - The openning `{` is indented on the next newline. + - The opening `{` is indented on the next newline. - While the maximum code line length varies, generally long `if`, `while`, ... statements are wrapped to newlines. - Pointer operators in declarations must precede any macro documentation, e.g, `const tidyLocaleMapItem* TIDY_CALL getNextWindowsLanguage( TidyIterator* iter )` instead of `const tidyLocaleMapItem TIDY_CALL *getNextWindowsLanguage( TidyIterator* iter )` in case `TIDY_CALL` is defined. diff --git a/README/MESSAGES.md b/README/MESSAGES.md index fc857f8..95648bd 100644 --- a/README/MESSAGES.md +++ b/README/MESSAGES.md @@ -36,6 +36,6 @@ Note that Tidy doesn't currently support numbered `printf` parameters; parameter The last step — hopefully — is adding the message key to the `dispatchTable[]` structure in `message.c`. This structure determines the `TidyReportLevel` (report severity) and message formatter (how to print the message). Then whenever you issue the report with `TY_(Report)()` or one of the existing convenience report functions, the correct message formatter will be used for the parameters that you specify. -Please read the source code in `message.c` for help on how to choose a message formatter, or how to modify one of the existing message formatters if you need to accomodate a new function signature for your report. +Please read the source code in `message.c` for help on how to choose a message formatter, or how to modify one of the existing message formatters if you need to accommodate a new function signature for your report. eof; diff --git a/README/OPTIONS.md b/README/OPTIONS.md index ff0d84e..16902cc 100644 --- a/README/OPTIONS.md +++ b/README/OPTIONS.md @@ -2,7 +2,7 @@ Tidy supports a quite large number of configuration options. The full list can be output using `-help-config`. This will show the option to be used either on the command line or in a configuration file, the type of option, and the value(s) that can be used. The current default value for each option can be seen using `-show-config`. -The options can also be listed in xml format. `-xml-help` will output each option plus a description. `-xml-config` will not only output the option and a desciption, but will include the type, default and examples. These xml outputs are used, with the aid of `xsltproc` and `doxygen`, to generate the [API Documentation](http://api.html-tidy.org/). +The options can also be listed in xml format. `-xml-help` will output each option plus a description. `-xml-config` will not only output the option and a description, but will include the type, default and examples. These xml outputs are used, with the aid of `xsltproc` and `doxygen`, to generate the [API Documentation](http://api.html-tidy.org/). These options can also be used by application linking with `libtidy`. For each option there is a `TidyOptionId` enumeration in the `tidyenum.h` file, and get/set functions for each option type. @@ -17,7 +17,7 @@ This file indicates how to add a new option to tidy, here adding an option `Tidy In `tidyenum.h` the `TidyOptionId` can be in any order, but please try to keep things alphabetical, and keep in mind that `N_TIDY_OPTIONS` must remain the last. Choosing the id name can be any string, but by convention it will commence with `Tidy` followed by brief descriptive text. -Naturally it can not be the same as any exisitng option. That is, it must be unique. And it will be followed by a brief descriptive special doxygen formatted comment. So for this new option I have chosen - +Naturally it can not be the same as any existing option. That is, it must be unique. And it will be followed by a brief descriptive special doxygen formatted comment. So for this new option I have chosen - ~~~ TidyEscapeScripts, /**< Escape items that look like closing tags */ @@ -105,7 +105,7 @@ The `key` is the option `ID`; The `pluralForm` is not used for options, and shou Some care has to be taken with the description string. The only html allowed here is `...`, `...`, `...`, `...`, and `
`. Entities, tags, attributes, etc., should be enclosed in `...`. Option values should be enclosed in `...`. It's very important that `
` be self-closing! This string is processed to build the API documentation. -This is the desription added for this new option. +This is the description added for this new option. ~~~ { diff --git a/README/README.html b/README/README.html index b714301..7714b66 100644 --- a/README/README.html +++ b/README/README.html @@ -11,7 +11,7 @@

CMake comes in two forms - command line and GUI. Some installations only install one or the other, but sometimes both. The build commands below are only for command line use.

-

Also the actual build tools vary for each platform. But that is one of the great features of CMake, it can generate variuous ‘native’ build files. Running cmake --help should list the generators available on that platform. For sure one of the common ones is “Unix Makefiles”, which needs autotools make installed, but many other generators are supported.

+

Also the actual build tools vary for each platform. But that is one of the great features of CMake, it can generate various ‘native’ build files. Running cmake --help should list the generators available on that platform. For sure one of the common ones is “Unix Makefiles”, which needs autotools make installed, but many other generators are supported.

In Windows CMake offers various versions for MSVC. Again below only the command line use of MSVC is shown, but the tidy solution (*.sln) file can be loaded into the MSVC IDE, and the building done in there.

diff --git a/README/TAGS.md b/README/TAGS.md index 36d9f52..87af070 100644 --- a/README/TAGS.md +++ b/README/TAGS.md @@ -2,7 +2,7 @@ This is about adding a new HTML **tag**. -Tidy tries to support all **tags** supported by the W3C. To add a new supported **tag**, the defintion begins in `tidyenum.h`, to give it a value. Then it is added to the `tag_defs[]` table in `tags.c`, where it is given a unique string, supported html versions, attributes support, and a bit `type`. +Tidy tries to support all **tags** supported by the W3C. To add a new supported **tag**, the definition begins in `tidyenum.h`, to give it a value. Then it is added to the `tag_defs[]` table in `tags.c`, where it is given a unique string, supported html versions, attributes support, and a bit `type`. Note, there are a group of configuration options to add **tags** not yet approved by the W3C. These are [new-blocklevel-tags](http://api.html-tidy.org/tidy/quickref_5.2.0.html#new-blocklevel-tags), [new-empty-tags](http://api.html-tidy.org/tidy/quickref_5.2.0.html#new-empty-tags), [new-inline-tags](http://api.html-tidy.org/tidy/quickref_5.2.0.html#new-inline-tags). and [new-pre-tags](http://api.html-tidy.org/tidy/quickref_5.2.0.html#new-pre-tags). This provides a way to extend the `tag_defs[]` table just for that tidy session. diff --git a/README/TESTING.md b/README/TESTING.md index 51077ef..154279b 100644 --- a/README/TESTING.md +++ b/README/TESTING.md @@ -37,7 +37,7 @@ write at least one test case in `github-cases` and put the expected results in importantly, will become part of the standard regression testing suite once the PR is merged. -Try to keep your test case(s) as succint as possible, and do try to put some HTML +Try to keep your test case(s) as succinct as possible, and do try to put some HTML comments in the file explaining the purpose of the test case, and if applicable, the Github issue and/or PR number. @@ -69,4 +69,4 @@ determined that a standards change #yyyy impacts us because of zzz. ## Regression Testing Specifics -The regression testing mechanism is described more fully in [regression_testing/README.md](../regression_testing/README.md). \ No newline at end of file +The regression testing mechanism is described more fully in [regression_testing/README.md](../regression_testing/README.md). diff --git a/README/VERSION.md b/README/VERSION.md index e1ea863..b9134ff 100644 --- a/README/VERSION.md +++ b/README/VERSION.md @@ -70,7 +70,7 @@ add_definitions ( -DLIBTIDY_VERSION="${LIBTIDY_VERSION}" ) add_definitions ( -DRELEASE_DATE="${tidy_YEAR}/${tidy_MONTH}/${tidy_DAY}" ) ~~~ -And in `CMakeLists.txt` there is the posibility to define another macro, when and if required: +And in `CMakeLists.txt` there is the possibility to define another macro, when and if required: ~~~ # add_definitions ( -DRC_NUMBER="D231" ) diff --git a/build/cmake/build-api.sh b/build/cmake/build-api.sh index eefa517..cf878e7 100755 --- a/build/cmake/build-api.sh +++ b/build/cmake/build-api.sh @@ -37,7 +37,7 @@ TMPZFIL="../../documentation/$TMPZIP" if [ -f "$TMPZFIL" ]; then ls -l $TMPZFIL echo "$BN: WARNING: Current ZIP will be overwritten!" - echo "$BN: DO you want to coninue?" + echo "$BN: DO you want to continue?" ask fi @@ -49,7 +49,7 @@ if [ ! -x "$TMPFIL" ]; then fi if [ -d "$TMPDIR" ]; then - echo "$BN: Directory '$TMPDIR' will be deleted prior the documentaion build..." + echo "$BN: Directory '$TMPDIR' will be deleted prior the documentation build..." fi ./$TMPFIL -DBUILD_DOCUMENTATION:BOOL=YES diff --git a/build/cmake/build-me.bat b/build/cmake/build-me.bat index fbf853f..73d1883 100644 --- a/build/cmake/build-me.bat +++ b/build/cmake/build-me.bat @@ -66,7 +66,7 @@ @if "%TMPINDBG%x" == "1x" ( @echo Will install Debug and Release ) else { -@echo Will only intall Release +@echo Will only install Release ) @echo. diff --git a/build/win64/build-me.bat b/build/win64/build-me.bat index d29a732..82f3800 100644 --- a/build/win64/build-me.bat +++ b/build/win64/build-me.bat @@ -67,7 +67,7 @@ @if "%TMPINDBG%x" == "1x" ( @echo Will install Debug and Release ) else ( -@echo Will only intall Release +@echo Will only install Release ) @echo. diff --git a/console/tidy.c b/console/tidy.c index 3a3d9ad..dba7e64 100644 --- a/console/tidy.c +++ b/console/tidy.c @@ -310,7 +310,7 @@ typedef enum CmdOptCatLAST } CmdOptCategory; -/** This array contains headings that will be used in help ouput. +/** This array contains headings that will be used in help output. */ static const struct { ctmbstr mnemonic; /**< Used in XML as a class. */ @@ -649,7 +649,7 @@ static void getSortedOption(TidyDoc tdoc, /**< The Tidy document. */ tOption->topt[i] = NULL; /* sentinel */ qsort(tOption->topt, - i, /* there are i items, not including the sentinal */ + i, /* there are i items, not including the sentinel */ sizeof(tOption->topt[0]), cmpOpt); } @@ -2224,7 +2224,7 @@ int main( int argc, char** argv ) else if ( strcasecmp(arg, "quiet") == 0 ) tidyOptSetBool( tdoc, TidyQuiet, yes ); - /* Currenly user must specify a language + /* Currently user must specify a language prior to anything that causes output */ else if ( strcasecmp(arg, "language") == 0 || strcasecmp(arg, "lang") == 0 ) diff --git a/experimental/httpio.c b/experimental/httpio.c index cda9270..f14919e 100644 --- a/experimental/httpio.c +++ b/experimental/httpio.c @@ -76,7 +76,7 @@ int parseURL( HTTPInputSource *pHttp, tmbstr url ) if (!pHttp->nPort) return -1; } - else /* or just a misformed port number */ + else /* or just a malformed port number */ return -1; } else diff --git a/include/tidyenum.h b/include/tidyenum.h index 817b493..36407c1 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -627,7 +627,7 @@ typedef enum TidyOutCharEncoding, /**< Output character encoding (if different) */ TidyOutFile, /**< File name to write markup to */ TidyOutputBOM, /**< Output a Byte Order Mark (BOM) for UTF-16 encodings */ - TidyPPrintTabs, /**< Indent using tabs istead of spaces */ + TidyPPrintTabs, /**< Indent using tabs instead of spaces */ TidyPreserveEntities, /**< Preserve entities */ TidyPreTags, /**< Declared pre tags */ TidyPriorityAttributes, /**< Attributes to place first in an element */ @@ -646,7 +646,7 @@ typedef enum TidySkipNested, /**< Skip nested tags in script and style CDATA */ TidySortAttributes, /**< Sort attributes */ TidyStrictTagsAttr, /**< Ensure tags and attributes match output HTML version */ - TidyStyleTags, /**< Move sytle to head */ + TidyStyleTags, /**< Move style to head */ TidyTabSize, /**< Expand tabs to n spaces */ TidyUpperCaseAttrs, /**< Output attributes in upper not lower case */ TidyUpperCaseTags, /**< Output tags in upper not lower case */ diff --git a/include/tidyplatform.h b/include/tidyplatform.h index 89b6a77..da226b6 100644 --- a/include/tidyplatform.h +++ b/include/tidyplatform.h @@ -10,7 +10,7 @@ * * @note It should be largely unnecessary to modify this file unless adding * support for a completely new architecture. Most options defined in this - * file specify defaults that can be overriden by the build system; for + * file specify defaults that can be overridden by the build system; for * example, passing -D flags to CMake. * * @author Charles Reitzel [creitzel@rcn.com] diff --git a/localize/language_ll_cc.h.erb b/localize/language_ll_cc.h.erb index cf55795..419d451 100644 --- a/localize/language_ll_cc.h.erb +++ b/localize/language_ll_cc.h.erb @@ -26,7 +26,7 @@ * * Template Created by Jim Derry on 01/14/2016. * - * Orginating PO file metadata: + * Originating PO file metadata: * PO_LAST_TRANSLATOR=<%= po_content.last_translator %> * PO_REVISION_DATE=<%= po_content.po_revision_date %> */ diff --git a/regression_testing/README.md b/regression_testing/README.md index 848f4b5..713f692 100644 --- a/regression_testing/README.md +++ b/regression_testing/README.md @@ -97,7 +97,7 @@ Running Test Tests ### Preparing the Environment -Assuming that you have a working Ruby interpretor, version 2.7 or so, upon +Assuming that you have a working Ruby interpreter, version 2.7 or so, upon `CD`-ing into the `tidy-html5-test` directory, you should execute `bundle install`, which ensures that any dependencies that your environment doesn’t already have will be downloaded. @@ -155,7 +155,7 @@ set of case files). - Optional Tidy configuration files shall be named `case-basename.conf`. - - In the absense of a configuration file, the file `config_default.conf` in + - In the absence of a configuration file, the file `config_default.conf` in each directory will be used instead. - `README<.txt|.md>`, which describes the test set. diff --git a/regression_testing/test.rb b/regression_testing/test.rb index c295a37..d2f81d0 100755 --- a/regression_testing/test.rb +++ b/regression_testing/test.rb @@ -135,7 +135,7 @@ module TidyRegressionTestModule case_name = File.basename( html_file[/(.*)@/,1] ) candidate_expects_html = File.join( self.dir_expects, "#{case_name}#{File.extname(html_file)}" ) candidate_expects_output = File.join( self.dir_expects, "#{case_name}.txt" ) - #noinspection RubyNilAnalysis -- this is a false positive, because we've explicitely made this an array. + #noinspection RubyNilAnalysis -- this is a false positive, because we've explicitly made this an array. @case_paths.push(html_file) unless File.exist?(candidate_expects_html) && File.exist?(candidate_expects_output) SHARED_LOGGER.warn("Note: #{html_file} is missing some expectations files in #{self.dir_expects}.") diff --git a/src/access.c b/src/access.c index 1a74956..4ed7c1b 100644 --- a/src/access.c +++ b/src/access.c @@ -540,7 +540,7 @@ static Bool IsValidSrcExtension( ctmbstr sType ) /********************************************************************* * IsValidMediaExtension * -* Checks to warn the user that syncronized text equivalents are +* Checks to warn the user that synchronized text equivalents are * required if multimedia is used. *********************************************************************/ @@ -2545,7 +2545,7 @@ static void CheckParagraphHeader( TidyDocImpl* doc, Node* node ) * CheckEmbed * * Checks to see if 'SRC' is a multimedia type. Must have -* syncronized captions if used. +* synchronized captions if used. ****************************************************************/ static void CheckEmbed( TidyDocImpl* doc, Node* node ) @@ -3426,7 +3426,7 @@ static void AccessibilityCheckNode( TidyDocImpl* doc, Node* node ) CheckParagraphHeader( doc, node ); } - /* Checks HTML elemnt for valid 'LANG' */ + /* Checks HTML element for valid 'LANG' */ else if ( nodeIsHTML(node) ) { CheckHTMLAccess( doc, node ); diff --git a/src/attrs.c b/src/attrs.c index 919e625..9604a32 100644 --- a/src/attrs.c +++ b/src/attrs.c @@ -1333,7 +1333,7 @@ static void AppendToStyleAttr( TidyDocImpl* doc, AttVal *styleattr, ctmbstr styl if (end >0 && styleattr->value[end - 1] == ';') { - /* attribute ends with declaration seperator */ + /* attribute ends with declaration separator */ styleattr->value = (tmbstr) TidyDocRealloc(doc, styleattr->value, end + TY_(tmbstrlen)(styleprop) + 2); @@ -1894,7 +1894,7 @@ void CheckIs( TidyDocImpl* doc, Node *node, AttVal *attval ) /* Even if we fail the above test, we'll continue to emit reports because the user should *also* know that his attribute values are wrong, even - if they should't be in custom tags anyway. */ + if they shouldn't be in custom tags anyway. */ /* `is` MUST have a value */ if (!AttrHasValue(attval)) @@ -2103,7 +2103,7 @@ void CheckNumber( TidyDocImpl* doc, Node *node, AttVal *attval) /* font size may be preceded by + or - */ if ( nodeIsFONT(node) && (*p == '+' || *p == '-') ) ++p; - /* tabindex may be preceeded by - */ + /* tabindex may be preceded by - */ if (attval->attribute && (strcmp(attval->attribute,"tabindex") == 0) && (*p == '-')) ++p; @@ -2472,7 +2472,7 @@ void TY_(SortAttributes)(TidyDocImpl* doc, Node* node, TidyAttrSortStrategy stra * * Portions copyright Simon Tatham 2001. * -* Merge sort algortithm adpated from listsort.c linked from +* Merge sort algorithm adapted from listsort.c linked from * http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html * * Original copyright notice proceeds below. diff --git a/src/clean.c b/src/clean.c index a4aa815..5e2b936 100644 --- a/src/clean.c +++ b/src/clean.c @@ -1339,7 +1339,7 @@ static Bool InlineElementToCSS( TidyDocImpl* doc, Node* node, ctmbstr CSSeq; /* if node is the only child of parent element then leave alone - Do so only if BlockStyle may be succesful. */ + Do so only if BlockStyle may be successful. */ if ( node->parent->content == node && node->next == NULL && (CanApplyBlockStyle(node->parent) || CanApplyInlineStyle(node->parent)) ) @@ -1366,7 +1366,7 @@ static Bool Font2Span( TidyDocImpl* doc, Node *node, Node **pnode ) if ( nodeIsFONT(node) ) { /* if node is the only child of parent element then leave alone - Do so only if BlockStyle may be succesful. */ + Do so only if BlockStyle may be successful. */ if ( node->parent->content == node && node->next == NULL && CanApplyBlockStyle(node->parent) ) return no; @@ -1882,7 +1882,7 @@ static Bool SingleSpace( Lexer* lexer, Node* node ) */ void TY_(CleanWord2000)( TidyDocImpl* doc, Node *node) { - /* used to a list from a sequence of bulletted p's */ + /* used to a list from a sequence of bulleted p's */ Lexer* lexer = doc->lexer; Node* list = NULL; AttVal *next_attr, *attval; @@ -1896,7 +1896,7 @@ void TY_(CleanWord2000)( TidyDocImpl* doc, Node *node) if ( !TY_(IsWord2000) (doc) ) /* Is. #896 */ return; - /* Output proprietary attributes to maintain errout compatability + /* Output proprietary attributes to maintain errout compatibility * with traditional Tidy. This is a result of moving all of the * proprietary checks to near the end of the cleanup process, * meaning this result would not ordinarily be displayed. @@ -1984,7 +1984,7 @@ void TY_(CleanWord2000)( TidyDocImpl* doc, Node *node) /* discards which encodes the paragraph mark */ if ( node->tag && TY_(tmbstrcmp)(node->tag->name,"o:p")==0) { - /* Output proprietary elements to maintain errout compatability + /* Output proprietary elements to maintain errout compatibility * with traditional Tidy. This is a result of moving all of the * proprietary checks to near the end of the cleanup process, * meaning this result would not ordinarily be displayed. @@ -2303,7 +2303,7 @@ Bool TY_(TidyMetaCharset)(TidyDocImpl* doc) } else { - /* fix a mis-match */ + /* fix a mismatch */ if (charsetFound) { prevNode = currentNode->prev; diff --git a/src/config.h b/src/config.h index 2fc5d57..f6df9db 100644 --- a/src/config.h +++ b/src/config.h @@ -14,7 +14,7 @@ * continues on the next line * * Property names are case insensitive and should be less than 60 characters - * in length, and must start at the begining of the line, as whitespace at + * in length, and must start at the beginning of the line, as whitespace at * the start of a line signifies a line continuation. * * @author HTACG, et al (consult git log) @@ -173,7 +173,7 @@ TY_PRIVATE const TidyOptionImpl* TY_(getNextOption)( TidyDocImpl* doc, TidyItera /** Initiates an iterator to cycle through all of the available picklist ** possibilities. ** @param option An instance of an option for which to iterate a picklist. - ** @returns An interator token to be used with TY_(getNextOptionPick)(). + ** @returns An iterator token to be used with TY_(getNextOptionPick)(). */ TY_PRIVATE TidyIterator TY_(getOptionPickList)( const TidyOptionImpl* option ); diff --git a/src/language_en.h b/src/language_en.h index 6f3175f..29164b1 100644 --- a/src/language_en.h +++ b/src/language_en.h @@ -905,7 +905,7 @@ static languageDefinition language_en = { whichPluralForm_en, { TidyNewline, 0, "The default is appropriate to the current platform. " "
" - "Genrally CRLF on PC-DOS, Windows and OS/2; CR " + "Generally CRLF on PC-DOS, Windows and OS/2; CR " "on Classic Mac OS; and LF everywhere else (Linux, macOS, " "and Unix). " }, diff --git a/src/language_en_gb.h b/src/language_en_gb.h index 71c37e4..5c96890 100644 --- a/src/language_en_gb.h +++ b/src/language_en_gb.h @@ -26,7 +26,7 @@ * * Template Created by Jim Derry on 01/14/2016. * - * Orginating PO file metadata: + * Originating PO file metadata: * PO_LAST_TRANSLATOR=jderry * PO_REVISION_DATE=2017-10-03 12:44:37 */ diff --git a/src/language_es.h b/src/language_es.h index 14f51e5..c4f2faa 100644 --- a/src/language_es.h +++ b/src/language_es.h @@ -26,7 +26,7 @@ * * Template Created by Jim Derry on 01/14/2016. * - * Orginating PO file metadata: + * Originating PO file metadata: * PO_LAST_TRANSLATOR=jderry * PO_REVISION_DATE=2017-10-03 12:44:37 */ diff --git a/src/language_es_mx.h b/src/language_es_mx.h index 55b1b3a..a9a1ba3 100644 --- a/src/language_es_mx.h +++ b/src/language_es_mx.h @@ -26,7 +26,7 @@ * * Template Created by Jim Derry on 01/14/2016. * - * Orginating PO file metadata: + * Originating PO file metadata: * PO_LAST_TRANSLATOR=jderry * PO_REVISION_DATE=2017-10-03 12:44:37 */ diff --git a/src/language_fr.h b/src/language_fr.h index 06ec9b1..72c8c72 100644 --- a/src/language_fr.h +++ b/src/language_fr.h @@ -26,7 +26,7 @@ * * Template Created by Jim Derry on 01/14/2016. * - * Orginating PO file metadata: + * Originating PO file metadata: * PO_LAST_TRANSLATOR=jderry * PO_REVISION_DATE=2017-10-05 15:13:40 */ diff --git a/src/language_pt_br.h b/src/language_pt_br.h index 0e4ea08..908529f 100644 --- a/src/language_pt_br.h +++ b/src/language_pt_br.h @@ -26,7 +26,7 @@ * * Template Created by Jim Derry on 01/14/2016. * - * Orginating PO file metadata: + * Originating PO file metadata: * PO_LAST_TRANSLATOR=jderry * PO_REVISION_DATE=2017-10-05 15:13:40 */ diff --git a/src/language_zh_cn.h b/src/language_zh_cn.h index 1919fa5..82caec7 100644 --- a/src/language_zh_cn.h +++ b/src/language_zh_cn.h @@ -26,7 +26,7 @@ * * Template Created by Jim Derry on 01/14/2016. * - * Orginating PO file metadata: + * Originating PO file metadata: * PO_LAST_TRANSLATOR=jderry * PO_REVISION_DATE=2017-10-03 12:44:37 */ diff --git a/src/lexer.c b/src/lexer.c index bc4e50a..0fe5dd6 100644 --- a/src/lexer.c +++ b/src/lexer.c @@ -1137,7 +1137,7 @@ static SPStatus GetSurrogatePair(TidyDocImpl* doc, Bool isXml, uint *pch) /* No longer attempts to insert missing ';' for unknown - enitities unless one was present already, since this + entities unless one was present already, since this gives unexpected results. For example: @@ -1364,7 +1364,7 @@ static void ParseEntity( TidyDocImpl* doc, GetTokenMode mode ) { if ( c != ';' ) /* issue warning if not terminated by ';' */ { - /* set error position just before offending chararcter */ + /* set error position just before offending character */ SetLexerLocus( doc, lexer ); lexer->columns = startcol; TY_(ReportEntityError)( doc, MISSING_SEMICOLON, lexer->lexbuf+start, c ); @@ -3375,7 +3375,7 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode ) } /* this failed! TY_(AddCharToLexer)(lexer, '-'); TY_(AddCharToLexer)(lexer, '-'); lexdump = 0; - got output - needs furhter fix in pprint section output + got output - needs further fix in pprint section output */ } else @@ -3727,7 +3727,7 @@ static tmbstr ParseAttribute( TidyDocImpl* doc, Bool *isempty, { /* Not '/>' - put it back */ TY_(UngetChar)(c, doc->docIn); - c = '/'; /* retore original char */ + c = '/'; /* restore original char */ } } diff --git a/src/lexer.h b/src/lexer.h index c181d4b..113a9f4 100644 --- a/src/lexer.h +++ b/src/lexer.h @@ -146,7 +146,7 @@ typedef enum #define CM_NO_INDENT (1 << 18) /* Elements that are obsolete (such as "dir", "menu"). */ #define CM_OBSOLETE (1 << 19) -/* User defined elements. Used to determine how attributes wihout value +/* User defined elements. Used to determine how attributes without value should be printed. */ #define CM_NEW (1 << 20) /* Elements that cannot be omitted. */ diff --git a/src/message.c b/src/message.c index 7c57dfc..dfb9fa2 100644 --- a/src/message.c +++ b/src/message.c @@ -103,7 +103,7 @@ static ctmbstr HTMLVersion( TidyDocImpl* doc ) /********************************************************************* * Message Writing Functions - * These funtions provide final, formatted output to the output sink. + * These functions provide final, formatted output to the output sink. *********************************************************************/ @@ -209,7 +209,7 @@ static void messageOut( TidyMessageImpl *message ) /* Always add a trailing newline. Reports require this, and dialogue messages will be better spaced out without having to fill the - language file with superflous newlines. */ + language file with superfluous newlines. */ TY_(WriteChar)( '\n', doc->errout ); } @@ -229,7 +229,7 @@ static void messageOut( TidyMessageImpl *message ) /* Functions of this type will create new instances of TidyMessage specific to -** the type of report being emitted. Many messages share the same fomatter for +** the type of report being emitted. Many messages share the same formatter for ** messages, but new ones can be written as required. Please have a look at ** the existing formatters in order to determine if an existing signature is ** compatible with the report you wish to output before adding a new formatter. @@ -890,7 +890,7 @@ TidyMessageImpl *formatStandardDynamic(TidyDocImpl* doc, Node *element, Node *no /********************************************************************* * High Level Message Writing Functions * When adding new reports to LibTidy, preference should be given - * to one of the existing, general pupose message writing functions + * to one of the existing, general purpose message writing functions * above, if possible, otherwise try to use one of these, or as a * last resort add a new one in this section. *********************************************************************/ @@ -937,7 +937,7 @@ static void vReport(TidyDocImpl* doc, Node *element, Node *node, uint code, va_l ** type safety by using the variable arguments. To counter this some convenience ** report output functions exist, too. Any new reports you wish to create must ** be able to use this function signature, although convenience functions should -** be added to abstract the full fuction signature and to preserve type safety. +** be added to abstract the full function signature and to preserve type safety. */ void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...) { @@ -1286,7 +1286,7 @@ void TY_(ReportMarkupVersion)( TidyDocImpl* doc ) TY_(Report)( doc, NULL, NULL, STRING_CONTENT_LOOKS, vers ); - /* Warn about missing sytem identifier (SI) in emitted doctype */ + /* Warn about missing system identifier (SI) in emitted doctype */ if ( TY_(WarnMissingSIInEmittedDocType)( doc ) ) TY_(Report)( doc, NULL, NULL, STRING_NO_SYSID ); } diff --git a/src/message.h b/src/message.h index b8e759c..2cdad30 100644 --- a/src/message.h +++ b/src/message.h @@ -103,7 +103,7 @@ TY_PRIVATE ctmbstr TY_(tidyLibraryVersion)(void); /** * The designated report writing function. When a proper formatter exists, - * this one function can hanle all report output. + * this one function can handle all report output. */ TY_PRIVATE void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...); @@ -171,7 +171,7 @@ TY_PRIVATE void TY_(ReportMarkupVersion)( TidyDocImpl* doc ); /** * Reports the number of warnings and errors found in the document as dialogue - * inforation. + * information. * Called by `tidyRunDiagnostics()`, from console. */ TY_PRIVATE void TY_(ReportNumWarnings)( TidyDocImpl* doc ); diff --git a/src/messageobj.c b/src/messageobj.c index 8d25b95..93d5504 100644 --- a/src/messageobj.c +++ b/src/messageobj.c @@ -179,7 +179,7 @@ static TidyMessageImpl *tidyMessageCreateInitV( TidyDocImpl *doc, if ( ( cfgBool(doc, TidyMuteShow) == yes ) && level <= TidyFatal ) { /*\ Issue #655 - Unsafe to use output buffer as one of the va_list - * input parameters in some snprintf implmentations. + * input parameters in some snprintf implementations. \*/ ctmbstr pc = TY_(tidyErrorCodeAsKey)(code); i = TY_(tmbstrlen)(result->messageOutputDefault); diff --git a/src/parser.c b/src/parser.c index c974c0e..eab7393 100644 --- a/src/parser.c +++ b/src/parser.c @@ -131,7 +131,7 @@ Node *TY_(DiscardElement)( TidyDocImpl* doc, Node *element ) } /* - insert "node" into markup tree as the firt element + insert "node" into markup tree as the first element of content of "element" */ void TY_(InsertNodeAtStart)(Node *element, Node *node) @@ -852,7 +852,7 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) { /* Issue #212 - Further fix in case ParseBlock() is called with 'IgnoreWhitespace' when such a leading space may need to be inserted before this element to - preverve the browser view */ + preserve the browser view */ mode = MixedContent; } @@ -3216,7 +3216,7 @@ void TY_(ParsePre)( TidyDocImpl* doc, Node *pre, GetTokenMode ARG_UNUSED(mode) ) the
 into the newly opened 

. Todo: IMG, OBJECT, APPLET, BIG, SMALL, SUB, SUP, FONT, and BASEFONT are - dissallowed in

, Tidy neither detects this nor does it perform any
+              disallowed in 
, Tidy neither detects this nor does it perform any
               cleanup operation. Tidy should at least issue a warning if it encounters
               such constructs.
 
diff --git a/src/parser.h b/src/parser.h
index 3b7b1e3..5d62922 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -104,7 +104,7 @@ TY_PRIVATE Node *TY_(DiscardElement)( TidyDocImpl* doc, Node *element);
 
 
 /**
- *  Insert node into markup tree as the firt element of content of element.
+ *  Insert node into markup tree as the first element of content of element.
  *  @param element The new destination node.
  *  @param node The node to insert.
  */
diff --git a/src/pprint.c b/src/pprint.c
index 2dbbe3e..5522981 100644
--- a/src/pprint.c
+++ b/src/pprint.c
@@ -205,7 +205,7 @@ typedef enum
   document.
 
   Characters of the General Category Pi and Ps in the Unicode
-  character database (opening punctuation and intial quote
+  character database (opening punctuation and initial quote
   characters) mark a wrapping point before the character, other
   punctuation characters (Pc, Pd, Pe, Pf, and Po), breakable
   space characters (Zs), and paragraph and line separators
@@ -544,9 +544,9 @@ static void ResetLineAfterWrap( TidyPrintImpl* pprint )
 /*\
  *  Write the 'indent' char to output
  *  Issue #335 - The GetSpaces() returns the number of spaces to be
- *  used for the indent. This is fine if ouputting spaces.
+ *  used for the indent. This is fine if outputting spaces.
  *  However, if outputting 'tab' chars, then the number of tabs 
- *  output should euivalent to spaces divided by 'tab-size'
+ *  output should equivalent to spaces divided by 'tab-size'
 \*/
 static void WriteIndentChar(TidyDocImpl* doc )
 {
@@ -1861,7 +1861,7 @@ void PPrintScriptStyle( TidyDocImpl* doc, uint mode, uint indent, Node *node )
     if ( InsideHead(doc, node) )
       TY_(PFlushLineSmart)( doc, indent );
 
-    PCondFlushLineSmart( doc, indent );  /* Issue #56 - long oustanding bug - flush any existing closing tag */
+    PCondFlushLineSmart( doc, indent );  /* Issue #56 - long outstanding bug - flush any existing closing tag */
 
     PPrintTag( doc, mode, indent, node );
 
@@ -2027,7 +2027,7 @@ void TY_(PrintBody)( TidyDocImpl* doc )
 }
 
 /* #130 MathML attr and entity fix! 
-   Support MathML namepsace */
+   Support MathML namespace */
 static void PPrintMathML( TidyDocImpl* doc, uint indent, Node *node )
 {
     Node *content;
@@ -2234,7 +2234,7 @@ void TY_(PPrintTree)( TidyDocImpl* doc, uint mode, uint indent, Node *node )
 
             /*\
              *  Issue #180 - with the above PCondFlushLine, 
-             *  this adds an uneccessary additional line!
+             *  this adds an unnecessary additional line!
              *  Maybe only if 'classic' ie --vertical-space yes 
              *  Issue #582 - maybe this is no longer needed!
              *  It adds a 3rd newline if indent: auto...
diff --git a/src/tags.h b/src/tags.h
index 9cb5e6e..a071fd5 100644
--- a/src/tags.h
+++ b/src/tags.h
@@ -212,7 +212,7 @@ TY_PRIVATE void TY_(AdjustTags)( TidyDocImpl *doc );
 TY_PRIVATE void TY_(ResetTags)( TidyDocImpl *doc );
 
 
-/** Indicates whether or not the Tidy is procesing in HTML5 mode.
+/** Indicates whether or not the Tidy is processing in HTML5 mode.
  ** @param doc The Tidy document.
  ** @returns Returns `yes` if processing in HTML5 mode.
  */