Skip to content

Commit 713e4aa

Browse files
committed
Trim trailing whitespace
No code changes here, just a quality-of-life edit per htacg#903
1 parent df8ff5c commit 713e4aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1356
-1337
lines changed

CMakeLists.txt

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ if (LIBTIDY_VERSION)
5656
list(GET VERSION_LIST 2 TIDY_POINT_VERSION)
5757
else ()
5858
message(FATAL_ERROR "*** FAILED to get a VERSION from version.txt!")
59-
endif ()
60-
59+
endif ()
60+
6161
# Establish version date
6262
if (LIBTIDY_DATE)
6363
string(REPLACE "." ";" DATE_LIST ${LIBTIDY_DATE})
@@ -145,24 +145,24 @@ option( ENABLE_MEMORY_DEBUG "Set ON to output some memory diagnostics." OFF
145145

146146
if ( ENABLE_DEBUG_LOG )
147147
add_definitions( -DENABLE_DEBUG_LOG )
148-
message(STATUS "*** Debug Logging is enabled.")
148+
message(STATUS "*** Debug Logging is enabled.")
149149
else ()
150-
message(STATUS "*** Debug Logging is NOT enabled.")
150+
message(STATUS "*** Debug Logging is NOT enabled.")
151151
endif ()
152152

153153
if (ENABLE_ALLOC_DEBUG)
154154
add_definitions ( -DDEBUG_ALLOCATION ) # see lexer.c for details
155155
message(STATUS "*** Note, lexer.c node allocation diagnostics are ON")
156156
endif ()
157-
157+
158158
if (ENABLE_MEMORY_DEBUG)
159159
add_definitions ( -DDEBUG_MEMORY ) # see alloc.c for details
160160
message(STATUS "*** Note, alloc.c memory diagnostics are ON")
161161
endif ()
162-
162+
163163
if (WIN32)
164164
option( ENABLE_CRTDBG_MEMORY "Set ON to enable the Windows CRT debug library." OFF )
165-
165+
166166
if (ENABLE_CRTDBG_MEMORY)
167167
add_definitions ( -D_CRTDBG_MAP_ALLOC ) # see tidy.c for details
168168
message(STATUS "*** Note, tidy.c Windows CRT memory debug is ON")
@@ -178,9 +178,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
178178
set( WARNING_FLAGS -Wall )
179179
endif(CMAKE_COMPILER_IS_GNUCXX)
180180

181-
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
181+
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
182182
set( WARNING_FLAGS "-Wall -Wno-overloaded-virtual" )
183-
endif()
183+
endif()
184184

185185
if(WIN32 AND MSVC)
186186
# C4996: The compiler encountered a deprecated declaration.
@@ -190,7 +190,7 @@ if(WIN32 AND MSVC)
190190
foreach(warning 4996 4090 4244 4267)
191191
set(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}")
192192
endforeach()
193-
193+
194194
set( MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS" )
195195

196196
# to distinguish between debug and release lib in windows
@@ -206,7 +206,7 @@ set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MSVC_LD_FLAGS}" )
206206

207207
#------------------------------------------------------------------------
208208
# Static Windows Runtime
209-
# Option to statically link to the Windows runtime. Maybe only
209+
# Option to statically link to the Windows runtime. Maybe only
210210
# applies to WIN32/MSVC.
211211
#------------------------------------------------------------------------
212212
if (MSVC)
@@ -222,7 +222,7 @@ if (MSVC)
222222
)
223223
foreach(CompilerFlag ${CompilerFlags})
224224
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
225-
endforeach()
225+
endforeach()
226226
message(STATUS "Using /MT STATIC runtime")
227227
else ()
228228
message(STATUS "Using /MD DYNAMIC runtime")
@@ -255,14 +255,14 @@ if (NO_ACCESS_SUPPORT)
255255
endif ()
256256

257257
# Delete me? Not used in Tidy source!
258-
add_definitions ( -DHAVE_CONFIG_H )
258+
add_definitions ( -DHAVE_CONFIG_H )
259259

260260

261261
#------------------------------------------------------------------------
262262
# Runtime Configuration File Support
263263
# By default on Unix-like systems when building for the console program,
264264
# support runtime configuration files in /etc/ and in ~/. To prevent this,
265-
# set ENABLE_CONFIG_FILES to NO. Specify -DTIDY_CONFIG_FILE and/or
265+
# set ENABLE_CONFIG_FILES to NO. Specify -DTIDY_CONFIG_FILE and/or
266266
# -DTIDY_USER_CONFIG_FILE to override the default paths in tidyplatform.h.
267267
# @note: this section refactored to support #584.
268268
#------------------------------------------------------------------------
@@ -276,19 +276,19 @@ if ( UNIX AND SUPPORT_CONSOLE_APP )
276276
else ()
277277

278278
option ( ENABLE_CONFIG_FILES "Set to ON to enable Tidy runtime configuration file support" OFF )
279-
279+
280280
if ( SUPPORT_GETPWNAM )
281281
add_definitions( -DSUPPORT_GETPWNAM=1 )
282282
endif ()
283-
283+
284284
endif ()
285285

286286
if ( ENABLE_CONFIG_FILES )
287287

288288
message(STATUS "*** Building support for runtime configuration files.")
289289

290290
add_definitions( -DTIDY_ENABLE_CONFIG_FILES )
291-
291+
292292
# define a default here so we can pass to XSL.
293293
if ( NOT TIDY_CONFIG_FILE )
294294
set( TIDY_CONFIG_FILE "/etc/tidy.conf" )
@@ -304,7 +304,7 @@ if ( ENABLE_CONFIG_FILES )
304304
add_definitions( -DTIDY_USER_CONFIG_FILE="${TIDY_USER_CONFIG_FILE}" )
305305

306306
endif ()
307-
307+
308308

309309
#------------------------------------------------------------------------
310310
# Shared Library
@@ -341,7 +341,7 @@ set ( CFILES
341341
${SRCDIR}/tmbstr.c ${SRCDIR}/utf8.c ${SRCDIR}/tidylib.c
342342
${SRCDIR}/mappedio.c ${SRCDIR}/gdoc.c ${SRCDIR}/language.c
343343
${SRCDIR}/messageobj.c ${SRCDIR}/sprtf.c )
344-
344+
345345
set ( HFILES
346346
${INCDIR}/tidyplatform.h ${INCDIR}/tidy.h ${INCDIR}/tidyenum.h
347347
${INCDIR}/tidybuffio.h )
@@ -359,7 +359,7 @@ set ( LIBHFILES
359359
${SRCDIR}/tmbstr.h ${SRCDIR}/utf8.h ${SRCDIR}/tidy-int.h
360360
${SRCDIR}/version.h ${SRCDIR}/gdoc.h ${SRCDIR}/language.h
361361
${SRCDIR}/language_en.h ${SRCDIR}/sprtf.h )
362-
362+
363363

364364
#------------------------------------------------------------------------
365365
# Target Locations
@@ -383,11 +383,11 @@ endif ()
383383
#------------------------------------------------------------------------
384384
set(name tidy-static)
385385
add_library ( ${name} STATIC ${CFILES} ${HFILES} ${LIBHFILES} )
386-
set_target_properties( ${name} PROPERTIES
386+
set_target_properties( ${name} PROPERTIES
387387
OUTPUT_NAME ${LIB_NAME}s )
388388
if (NOT TIDY_CONSOLE_SHARED) # user wants default static linkage
389389
list ( APPEND add_LIBS ${name} )
390-
endif ()
390+
endif ()
391391
install(TARGETS ${name}
392392
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
393393
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
@@ -410,12 +410,12 @@ if (BUILD_SHARED_LIB)
410410
set(CMAKE_MACOSX_RPATH 1)
411411
endif ()
412412
add_library ( ${name} SHARED ${CFILES} ${HFILES} ${LIBHFILES} )
413-
set_target_properties( ${name} PROPERTIES
413+
set_target_properties( ${name} PROPERTIES
414414
OUTPUT_NAME ${LIB_NAME} )
415415
set_target_properties( ${name} PROPERTIES
416416
VERSION ${LIBTIDY_VERSION}
417417
SOVERSION ${TIDY_MAJOR_VERSION} )
418-
set_target_properties( ${name} PROPERTIES
418+
set_target_properties( ${name} PROPERTIES
419419
COMPILE_FLAGS "-DBUILD_SHARED_LIB -DBUILDING_SHARED_LIB")
420420
install(TARGETS ${name}
421421
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
@@ -424,7 +424,7 @@ if (BUILD_SHARED_LIB)
424424
)
425425
if (TIDY_CONSOLE_SHARED) # user wants shared/dll linkage
426426
list ( APPEND add_LIBS ${name} )
427-
endif ()
427+
endif ()
428428
endif ()
429429

430430

@@ -442,7 +442,7 @@ if (SUPPORT_CONSOLE_APP)
442442
set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d )
443443
endif ()
444444
if (NOT TIDY_CONSOLE_SHARED)
445-
set_target_properties( ${name} PROPERTIES
445+
set_target_properties( ${name} PROPERTIES
446446
COMPILE_FLAGS "-DTIDY_STATIC" )
447447
endif ()
448448
install (TARGETS ${name} DESTINATION bin)
@@ -488,13 +488,13 @@ if (UNIX AND SUPPORT_CONSOLE_APP)
488488
set(TIDYHELP ${CMAKE_CURRENT_BINARY_DIR}/tidy-help.xml)
489489
set(TIDYCONFIG ${CMAKE_CURRENT_BINARY_DIR}/tidy-config.xml)
490490
add_custom_target(man ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}")
491-
491+
492492
## Populate the @VARIABLES@ in the input file.
493493
configure_file(
494494
${CMAKE_CURRENT_SOURCE_DIR}/man/tidy1.xsl.in
495495
${TIDY1XSL}
496496
)
497-
497+
498498
# Run the built EXE to generate xml output .
499499
add_custom_command(
500500
TARGET man
@@ -542,7 +542,7 @@ endif()
542542

543543
#------------------------------------------------------------------------
544544
# System Runtime Libraries
545-
# Need to ensure that system DLLs get included in a binary
545+
# Need to ensure that system DLLs get included in a binary
546546
# distribution, but since it can miss some - seems incomplete - make
547547
# optional.
548548
#------------------------------------------------------------------------
@@ -629,7 +629,7 @@ configure_file(
629629
"${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc"
630630
@ONLY
631631
)
632-
632+
633633
install(FILES
634634
"${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc"
635635
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ All other READMEs and related materials can be found in [README/][100]. Although
55
## Building HTML Tidy
66

77
- For build instructions please see [README/BUILD.md][115].
8-
8+
99
## Branches and Versions
1010

1111
Learn about which branches are available, which branch you should use, and how HTML Tidy’s versioning scheme works.
1212

1313
- Learn about version numbering in [README/VERSION.md][160].
1414
- Learn about our repository branches in [README/BRANCHES.md][110].
15-
15+
1616
## Contributing and Development Guides
1717

1818
We gladly accept PRs! Read about some of our contribution guidelines, and check out some of the additional explanatory documents that will aid your understanding of how to accomplish certain things in HTML Tidy.
@@ -63,7 +63,7 @@ Tidy supports localization, and welcomes translations into various languages. Pl
6363
This repository should be considered canonical for HTML Tidy as of 2015-January-15.
6464

6565
- This repository originally transferred from [w3c.github.com/tidy-html5][20], now redirected to the current site.
66-
66+
6767
- First moved to Github from [tidy.sourceforge.net][21]. Note, this site is kept only for historic reasons, and is not now well maintained.
6868

6969
**Tidy is the granddaddy of HTML tools, with support for modern standards.** Have fun...
@@ -93,4 +93,4 @@ HTML Tidy and LibTidy are free and open source software with a permissive licens
9393
[150]: README/MESSAGE.md
9494
[155]: README/OPTIONS.md
9595
[160]: README/VERSION.md
96-
96+

README/ATTRIBUTES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ So, to add a new `attribute=value`, on one or more existing tags, consists of th
1414
1. `tidyenum.h` - Give the attribute an internal name, like `TidyAttr_XXXX`, and thus a value. Please try to keep this enumeration in alphabetical order.
1515

1616
2. `attrs.c` - Assign the string value of the attribute. Of course this must be unique. And then assign a `function` to verify the attribute value. There are already a considerable number of defined functions to verify specific attribute values, but maybe this new attribute requires a new function, so that should be written, and defined.
17-
17+
1818
3. `attrdict.c` - If this attribute only relates to specific tags, then it should be added to their list. There are some general attributes that are allowed on every, or most tags, so this new attribute and value should be added accordingly.
19-
19+
2020
4. `tags.c` - Now the new attribute will be verified for each tag it is associated with in the `tag_defs[]` table. Like for example the `<button ...>`, `{ TidyTag_BUTTON, ...` has `&TY_(W3CAttrsFor_BUTTON)[0]` assigned.
2121

2222
So, normally, just changing 3 files, `tidyenum.h`, `attrs.c`, and `attrdict.c`, will already adjust `tags.c` to accept a new `attribute=value` for any tag, or all tags. Simple...

README/BUILD.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
## Prerequisites
44

55
1. git - [http://git-scm.com/book/en/v2/Getting-Started-Installing-Git][1]
6-
6+
77
2. cmake - [http://www.cmake.org/download/][2]
8-
8+
99
3. appropriate build tools for the platform
10-
10+
1111
4. the [xsltproc][3] tool is required to build and install the `tidy.1` man page on Unix-like platforms.
12-
12+
1313
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.
1414

1515
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.
@@ -23,11 +23,11 @@ In Windows CMake offers various versions for MSVC. Again below only the command
2323

2424
2. `cmake ../.. -DCMAKE_BUILD_TYPE=Release [-DCMAKE_INSTALL_PREFIX=/path/for/install]`
2525

26-
3. Windows: `cmake --build . --config Release`
26+
3. Windows: `cmake --build . --config Release`
2727
Unix/OS X: `make`
2828

29-
4. Install, if desired:
30-
Windows: `cmake --build . --config Release --target INSTALL`
29+
4. Install, if desired:
30+
Windows: `cmake --build . --config Release --target INSTALL`
3131
Unix/OS X: `[sudo] make install`
3232

3333
By default cmake sets the install path to `/usr/local/bin` in Unix. If you wanted the binary in say `/usr/bin` instead, then in 2. above use `-DCMAKE_INSTALL_PREFIX=/usr`.
@@ -70,5 +70,5 @@ make install
7070
[2]: http://www.cmake.org/download/
7171
[3]: http://xmlsoft.org/XSLT/xsltproc2.html
7272

73-
73+
7474
; eof

README/CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ In either place please start with a short subject to describe the issue. If it i
1616
- the output
1717
- the _expected_ output
1818
- some sample code (if an API question).
19-
19+
2020
This information will make replication of your issue much simpler for us.
2121

2222
If you do add sample HTML input, then it can also be very helpful if that sample **passes** the W3C [validator](https://validator.w3.org/#validate_by_upload). Tidy attempts to follow all current W3C standards.
@@ -53,11 +53,11 @@ Concerning the “Tidy Code Style,” checkout [CODESTYLE.md](CODESTYLE.md), but
5353

5454
Item 2., SSH Key, is optional, and only required if you want to use `clone [email protected]...`. And if you generate the ssh without a `passphrase`, things like `git push` can be done without a password. Just convenience. Alternatively you can use the `HTTPS` protocol...
5555

56-
Concerning 5., editing and committing your changes, **generally** it is better to `commit` changes often, adding an appropriate commit message to each, like `$ git commit -m "Is. #NNN - reason for change" <file[s]>`. This also aids in the **PR** review.
56+
Concerning 5., editing and committing your changes, **generally** it is better to `commit` changes often, adding an appropriate commit message to each, like `$ git commit -m "Is. #NNN - reason for change" <file[s]>`. This also aids in the **PR** review.
5757

5858
But the situation varies. Like adding say an option, which can mean several files have to be edited, where it is likely appropriate to combine a considerable number of edits into one commit. There can be no hard and fast rules on this.
5959

60-
Please note, if you want to change **multiple** things that don't depend on each other, use **different** `branches`, and make sure you check the `next` branch back out, before making more changes in a **new** branch name. That way we can take in each **change** separately, otherwise Github will **combine** all your branch commits into one **PR**.
60+
Please note, if you want to change **multiple** things that don't depend on each other, use **different** `branches`, and make sure you check the `next` branch back out, before making more changes in a **new** branch name. That way we can take in each **change** separately, otherwise Github will **combine** all your branch commits into one **PR**.
6161

6262
See below on keeping your forks `next` fully in sync with here, called `upstream` - **this is important**.
6363

@@ -85,7 +85,7 @@ $ ./testall.sh ../../tidy-fork/build/cmake/tidy
8585
$ diff -u ../cases/testbase-expects ../cases/testbase-results
8686
```
8787

88-
Use folder `tools-cmd` for windows. Run `alltest.bat --help`.
88+
Use folder `tools-cmd` for windows. Run `alltest.bat --help`.
8989

9090
If the `tests` shows a different exit value, or there are differences between the `expects` and `results`, these **must** be studied, and checked, very carefully. There may be cases where the **new** `results` are correct, in which case a simultaneous **PR** for the forked `tests` **must** be created to match your forked source **PR**.
9191

README/LICENSE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
## HTML parser and pretty printer
44

55
Copyright (c) 1998-2016 World Wide Web Consortium
6-
(Massachusetts Institute of Technology, European Research
6+
(Massachusetts Institute of Technology, European Research
77
Consortium for Informatics and Mathematics, Keio University).
88
All Rights Reserved.
99

10-
Additional contributions (c) 2001-2016 University of Toronto, Terry Teague,
10+
Additional contributions (c) 2001-2016 University of Toronto, Terry Teague,
1111
@geoffmcl, HTACG, and others.
1212

1313
### Contributing Author(s):
1414

1515
Dave Raggett <[email protected]>
1616

1717
The contributing author(s) would like to thank all those who
18-
helped with testing, bug fixes and suggestions for improvements.
18+
helped with testing, bug fixes and suggestions for improvements.
1919
This wouldn't have been possible without your help.
2020

2121
## COPYRIGHT NOTICE:
@@ -26,7 +26,7 @@ representations or warranties, express or implied, including
2626
but not limited to, warranties of merchantability or fitness
2727
for any particular purpose or that the use of the software or
2828
documentation will not infringe any third party patents,
29-
copyrights, trademarks or other rights.
29+
copyrights, trademarks or other rights.
3030

3131
The copyright holders and contributing author(s) will not be held
3232
liable for any direct, indirect, special or consequential damages

0 commit comments

Comments
 (0)