Skip to content

Commit 43c2bcb

Browse files
committed
Fix typos and broken links
1 parent 6d9b6bc commit 43c2bcb

12 files changed

+43
-43
lines changed

README

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Introduction
33

44
LuaXML is pure lua library for reading and serializing of the XML files. Current release is aimed mainly as support
55
for the odsfile package. The documentation was created by automatic conversion of original documentation in the source code.
6-
In this version, some files not useful for luaTeX were droped.
6+
In this version, some files not useful for luaTeX were dropped.
77

88

99
Install
@@ -14,11 +14,11 @@ then clone this repository and run
1414

1515
make install
1616

17-
Please note that you will need [LDoc](http://stevedonovan.github.io/ldoc/manual/doc.md.html#Processing_Single_Modules) and
18-
[dkjson](http://dkolf.de/src/dkjson-lua.fsl/home) Lua modules installed on your system. You can install them using:
17+
Please note that you will need [LDoc](https://stevedonovan.github.io/ldoc/manual/doc.md.html#Processing_Single_Modules) and
18+
[dkjson](http://dkolf.de/dkjson-lua/) Lua modules installed on your system. You can install them using:
1919

2020
$ luarocks install --local ldoc
21-
$ luarocks install --local dkjso
21+
$ luarocks install --local dkjson
2222

2323

2424
License:
@@ -34,7 +34,7 @@ Michal Hoftich
3434
Email: michal.h21@gmail.com
3535
Version: {{VERSION}}, {{DATE}}
3636

37-
Original authors: Paul Chakravarti and Manoel Campos (http://manoelcampos.com)
37+
Original authors: Paul Chakravarti and Manoel Campos (https://about.me/manoelcampos)
3838

3939
If you are interested in the process of development you may observe
4040

lexer.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ local M = {}
4444
-- SciTE editors. Finally there are comments on lexer performance and
4545
-- limitations.
4646
--
47-
-- [LPeg library]: http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html
48-
-- [Textadept]: http://foicica.com/textadept
49-
-- [SciTE]: http://scintilla.org/SciTE.html
47+
-- [LPeg library]: https://www.inf.puc-rio.br/~roberto/lpeg/
48+
-- [Textadept]: https://orbitalquark.github.io/textadept/
49+
-- [SciTE]: https://scintilla.org/SciTE.html
5050
--
5151
-- ## Lexer Basics
5252
--
@@ -59,7 +59,7 @@ local M = {}
5959
-- the name *lua.lua*.
6060
--
6161
-- Note: Try to refrain from using one-character language names like "b", "c",
62-
-- or "d". For example, Scintillua uses "b_lang", "cpp", and "dmd",
62+
-- or "d". For example, Scintilla uses "b_lang", "cpp", and "dmd",
6363
-- respectively.
6464
--
6565
-- ### New Lexer Template
@@ -420,7 +420,7 @@ local M = {}
420420
-- custom_whitespace = custom_style
421421
-- }
422422
--
423-
-- Notice that the lexer peforms Scintilla/SciTE-style "$()" property expansion.
423+
-- Notice that the lexer performs Scintilla/SciTE-style "$()" property expansion.
424424
-- You may also use "%()". Remember to refrain from assigning specific colors in
425425
-- styles, but in this case, all user color themes probably define the
426426
-- "color.grey" property.
@@ -546,7 +546,7 @@ local M = {}
546546
-- match is a beginning fold point and `-1` indicates the match is an ending
547547
-- fold point. Likewise, the second assignment states that any "/\*" or "\*/"
548548
-- that the lexer recognizes as part of a `lexer.COMMENT` token is a fold point.
549-
-- The lexer does not consider any occurences of these characters outside their
549+
-- The lexer does not consider any occurrences of these characters outside their
550550
-- defined tokens (such as in a string) as fold points. Finally, every
551551
-- `_foldsymbols` table must have a `_patterns` field that contains a list of
552552
-- [Lua patterns][] that match fold points. If the lexer encounters text that
@@ -597,7 +597,7 @@ local M = {}
597597
-- the current line's text, the position in the current line the matched text
598598
-- starts at, and the matched text itself.
599599
--
600-
-- [Lua patterns]: http://www.lua.org/manual/5.2/manual.html#6.4.1
600+
-- [Lua patterns]: https://www.lua.org/manual/5.4/manual.html#6.4.1
601601
--
602602
-- ### Fold by Indentation
603603
--
@@ -1208,7 +1208,7 @@ function M.fold(lexer, text, start_pos, start_line, start_level)
12081208
end
12091209
-- Find the first non-blank line before start_line. If the current line is
12101210
-- indented, make that previous line a header and update the levels of any
1211-
-- blank lines inbetween. If the current line is blank, match the level of
1211+
-- blank lines in between. If the current line is blank, match the level of
12121212
-- the previous non-blank line.
12131213
local current_level = start_level
12141214
for i = start_line - 1, 0, -1 do
@@ -1294,7 +1294,7 @@ M.word = (M.alpha + '_') * (M.alnum + '_')^0
12941294
-- If *name* is not a predefined token name, its style must be defined in the
12951295
-- lexer's `_tokenstyles` table.
12961296
-- @param name The name of token. If this name is not a predefined token name,
1297-
-- then a style needs to be assiciated with it in the lexer's `_tokenstyles`
1297+
-- then a style needs to be associated with it in the lexer's `_tokenstyles`
12981298
-- table.
12991299
-- @param patt The LPeg pattern associated with the token.
13001300
-- @return pattern

luaxml-cssquery.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ local function cssquery()
4141
end
4242
--- Calculate CSS specificity of the query
4343
-- @param query table created by CssQuery:prepare_selector() function
44-
-- @return integer speficity value
44+
-- @return integer specificity value
4545
function CssQuery:calculate_specificity(query)
4646
local query = query or {}
4747
local specificity = 0
@@ -435,7 +435,7 @@ local function cssquery()
435435
end
436436

437437
--- Remove selector from the CSS list object.
438-
-- All actions that literaly match the given selector will be removed.
438+
-- All actions that literally match the given selector will be removed.
439439
function CssQuery:remove_selector(
440440
selector -- CSS selector to be removed
441441
)
@@ -446,8 +446,8 @@ local function cssquery()
446446
end
447447
end
448448

449-
--- It tests list of queries agaings a DOM element and executes the
450-
--- coresponding function that is saved for the matched query.
449+
--- It tests list of queries against a DOM element and executes the
450+
--- corresponding function that is saved for the matched query.
451451
-- @return nothing
452452
function CssQuery:apply_querylist(
453453
domobj, -- DOM element

luaxml-domobject.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ parse = function(
371371
end
372372

373373
--- Execute function on the current element and all it's children nodes.
374-
-- The differenct to DOM_Object:traverse_elements() is that it executes the function
374+
-- The difference to DOM_Object:traverse_elements() is that it executes the function
375375
-- also on text nodes and all other kinds of XML nodes.
376376
-- The traversing of child elements of a given node can be disabled when the executed
377377
-- function returns false.

luaxml-mod-handler.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
--
8787
-- Usage
8888
-- =====
89-
-- Pased as delegate in xmlParser constructor and called
89+
-- Passed as delegate in xmlParser constructor and called
9090
-- as callback by xmlParser:parse(xml) method.
9191
--
9292
-- See textxml.lua for examples

luaxml-mod-xml.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
-- ====
3737
--
3838
-- The parser provides a partially object-oriented API with
39-
-- functionality split into tokeniser and hanlder components.
39+
-- functionality split into tokeniser and handler components.
4040
--
4141
-- The handler instance is passed to the tokeniser and receives
4242
-- callbacks for each XML element processed (if a suitable handler
@@ -102,7 +102,7 @@
102102
-- numeric entities only currently - could be extended
103103
-- at runtime if suitable DTD parser added elements
104104
-- to table (see obj._ENTITIES). May also be possible
105-
-- to expand multibyre entities for UTF-8 only
105+
-- to expand multibyte entities for UTF-8 only
106106
--
107107
-- * errorHandler
108108
--
@@ -148,7 +148,7 @@
148148
--
149149
-- Added parameter parseAttributes (boolean) in xmlParser.parse method
150150
-- If true, tag attributtes are parsed. The default value is true.
151-
-- by Manoel Campos (http://manoelcampos.com)
151+
-- by Manoel Campos (https://about.me/manoelcampos)
152152
--
153153
-- $Id: xml.lua,v 1.1.1.1 2001/11/28 06:11:33 paulc Exp $
154154
--
@@ -319,7 +319,7 @@ local xmlParser = function(handler)
319319
-- End tag
320320
if self._handler.endtag then
321321
if attrs then
322-
-- Shouldnt have any attributes in endtag
322+
-- Shouldn't have any attributes in endtag
323323
self:_err(format("%s (/%s)",
324324
self._errstr.endTagErr,
325325
tagname)

luaxml-transform.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- @module luaxml-transform
33
-- @author Michal Hoftich <michal.h21@gmail.com
44

5-
-- code originaly comes from from https://github.com/michal-h21/luaxml-mathml
5+
-- code originally comes from from https://github.com/michal-h21/luaxml-mathml
66
--
77
local domobject
88
local cssquery
@@ -91,7 +91,7 @@ local function process_children(element, parameters)
9191
-- concat text
9292
t[#t+1] = process_text(elem:get_text(), parameters)
9393
elseif elem:is_element() then
94-
-- recursivelly process child elements
94+
-- recursively process child elements
9595
t[#t+1] = process_tree(elem)
9696
end
9797
end
@@ -139,7 +139,7 @@ local function simple_content(s,parameters)
139139
return function(element)
140140
local content = process_children(element,parameters)
141141
local parameters = parameters or {}
142-
-- process attrubutes
142+
-- process attributes
143143
-- attribute should be marked as @{name}
144144
local expanded = s:gsub("@{(.-)}", function(name)
145145
return process_text(element:get_attribute(name) or "", parameters)
@@ -246,7 +246,7 @@ local function print_tex(content)
246246
end
247247

248248

249-
-- make Transformer objec
249+
-- make Transformer object
250250
local Transformer
251251

252252
--- Make new Transformer object

luaxml.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ \subsection{The domHandler}
11771177
\part{Original \texttt{LuaXML} documentation by Paul Chakravarti}
11781178
\medskip
11791179
1180-
\noindent This document was created automatically from the original source code comments using Pandoc\footnote{\url{http://johnmacfarlane.net/pandoc/}}
1180+
\noindent This document was created automatically from the original source code comments using Pandoc\footnote{\url{https://pandoc.org}}
11811181
11821182
\section{Overview}
11831183
@@ -1232,7 +1232,7 @@ \section{Limitations}
12321232
\section{API}
12331233
12341234
The parser provides a partially object-oriented API with functionality
1235-
split into tokeniser and hanlder components.
1235+
split into tokeniser and handler components.
12361236
12371237
The handler instance is passed to the tokeniser and receives callbacks
12381238
for each XML element processed (if a suitable handler function is
@@ -1419,13 +1419,13 @@ \subsection{Options}
14191419
\end{verbatim}
14201420
\subsection{Usage}
14211421
1422-
Pased as delegate in xmlParser constructor and called as callback by
1422+
Passed as delegate in xmlParser constructor and called as callback by
14231423
xmlParser:parse(xml) method.
14241424
14251425
\section{History}
14261426
1427-
This library is fork of LuaXML library originaly created by Paul
1428-
Chakravarti. Some files not needed for use with luatex were droped from the distribution.
1427+
This library is fork of LuaXML library originally created by Paul
1428+
Chakravarti. Some files not needed for use with luatex were dropped from the distribution.
14291429
Documentation was converted from original comments in the source code.
14301430
14311431
\section{License}

rockspecs/mhluaxml-dev-1.rockspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description = {
1212
detailed = [[
1313
LuaXML is pure lua library for reading and serializing of the XML files. Current release is aimed mainly as support
1414
for the odsfile package. The documentation was created by automatic conversion of original documentation in the source code.
15-
In this version, some files not useful for luaTeX were droped. ]],
15+
In this version, some files not useful for luaTeX were dropped. ]],
1616
homepage = "https://github.com/michal-h21/LuaXML",
1717
license = "MIT"
1818
}

test/dom-test.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe("Basic DOM functions", function()
103103
it("Should return table", function()
104104
assert.same(type(matched), "table")
105105
end)
106-
it("Should match two elemetns", function()
106+
it("Should match two elements", function()
107107
assert.same(#matched, 2)
108108
end)
109109
local el = matched[2]

test/html-test.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ describe("Test entities", function()
8686
local random = html.search_entity_tree {"r", "a", "n", "d", "o","m"}
8787
assert.same(type(random), "nil")
8888
end)
89-
it("Should support named entites", function()
90-
-- support named entites
89+
it("Should support named entities", function()
90+
-- support named entities
9191
local first = tostring(get_first_element("Hello &lt; world"))
9292
assert.same(first, "'Hello < world'")
93-
-- return unknown named entites as text
93+
-- return unknown named entities as text
9494
local second = tostring(get_first_element("Hello &nonexistent; world"))
9595
assert.same(second, "'Hello &nonexistent; world'")
96-
-- match partial named entites
97-
-- &amp is translated to &, rest is returend as text
96+
-- match partial named entities
97+
-- &amp is translated to &, rest is returned as text
9898
local third = tostring(get_first_element("hello &amperesand; world"))
9999
assert.same(third, "'hello &eresand; world'")
100100
-- in attribute values, &amp isn't matched
@@ -189,7 +189,7 @@ end
189189
describe("Special scope detection", function()
190190
it("Should support basic scoping", function()
191191
-- we cannot just parse HTML, because it has closed unfinished table,
192-
-- so we just recreate similar strcture to test scoping
192+
-- so we just recreate similar structure to test scoping
193193
local element = html.Element
194194
local html_el = element:init("html", {})
195195
local body = element:init("body", {})
@@ -202,7 +202,7 @@ describe("Special scope detection", function()
202202
assert.truthy(html.is_in_button_scope(x, "p"))
203203
-- b is not in scope
204204
assert.falsy(html.is_in_button_scope(x, "b"))
205-
-- caption is in list of elemetns which should return false for the scoping function
205+
-- caption is in list of elements which should return false for the scoping function
206206
local notp = {unfinished = {html, body, p, table, caption, span}}
207207
assert.falsy(html.is_in_button_scope(notp, "p"))
208208
-- table scope ignores only table, template and html

test/transform-test.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe("Basic DOM functions", function()
1313
it("should do basic transformations", function()
1414
assert.same("transform1: hello", transformer1:parse_xml(text))
1515
end)
16-
it("should support multiple tranformer objects", function()
16+
it("should support multiple transformer objects", function()
1717
assert.same("transform2: hello", transformer2:parse_xml(text))
1818
end)
1919
end)

0 commit comments

Comments
 (0)