Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Mar 4, 2024
1 parent 74a5a2a commit 4e46a1c
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# CHANGES IN bookdown VERSION 0.38

- Fixed a bug that `gitbook()` may geneate an empty search index on certain platforms (thanks, @UlvHare, #1454).
- Fixed a bug that `gitbook()` may generate an empty search index on certain platforms (thanks, @UlvHare, #1454).

# CHANGES IN bookdown VERSION 0.37

Expand Down
2 changes: 1 addition & 1 deletion R/html.R
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ parse_fig_labels = function(content, global = FALSE) {
# there could be multiple labels on the same line, but their types must be
# the same (https://github.com/rstudio/bookdown/issues/538)
if (length(unique(type)) != 1) stop(
'There are mutiple types of labels on one line: ', paste(labs, collapse = ', ')
'There are multiple types of labels on one line: ', paste(labs, collapse = ', ')
)
type = type[1]
num = arry[lab]
Expand Down
2 changes: 1 addition & 1 deletion inst/examples/03-formats.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ description: |

The `bs4_book()` format builds upon the Bootstrap CSS framework ([version 4](https://getbootstrap.com/docs/4.0/)), an open source library of reusable chunks of HTML, CSS, and JavaScript code. The Bootstrap framework allows for easy customization of colors and fonts via the **bslib** R package.

You can use the `theme` option to add a `primary` color in [hexidecimal format,](https://en.wikipedia.org/wiki/Web_colors) which will change the color of all links in your book and the background color of the footer.
You can use the `theme` option to add a `primary` color in [hexadecimal format,](https://en.wikipedia.org/wiki/Web_colors) which will change the color of all links in your book and the background color of the footer.

```yaml
bookdown::bs4_book:
Expand Down
4 changes: 2 additions & 2 deletions inst/examples/krantz.cls
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
\newdimen\tempa
\newdimen\tempdimen
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Parameter Initializaton %%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Parameter Initialization %%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newdimen\htrim
\newdimen\vtrimtop
Expand Down Expand Up @@ -1145,7 +1145,7 @@
\else
\@cons{\@authors}{, \last@author}\fi\fi
\stepcounter{numauthors}%
%%%%%%% commented and deleted below the second part to aviod inaccessible error % shashi % September-2008
%%%%%%% commented and deleted below the second part to avoid inaccessible error % shashi % September-2008
%% \gdef\last@author{#1 {\rm\fontsize{9\p@}{11\p@}\selectfont #2}}
\gdef\last@author{#1}
}
Expand Down
2 changes: 1 addition & 1 deletion inst/resources/gitbook/css/plugin-highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
.book.color-theme-1 .book-body .page-wrapper .page-inner section.normal code {
/*
Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <[email protected]>
Original Style from ethanschoonover.com/solarized (c) Jeremy Hull <[email protected]>
*/
/* Solarized Green */
Expand Down
30 changes: 15 additions & 15 deletions inst/resources/gitbook/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
* Used by `_.sortByOrder` to compare multiple properties of a value to another
* and stable sort them.
*
* If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise,
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
* a value is sorted in ascending order if its corresponding order is "asc", and
* descending if "desc".
*
Expand Down Expand Up @@ -923,7 +923,7 @@
* @private
* @param {*} value The value to wrap.
* @param {boolean} [chainAll] Enable chaining for all wrapper methods.
* @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value.
* @param {Array} [actions=[]] Actions to perform to resolve the unwrapped value.
*/
function LodashWrapper(value, chainAll, actions) {
this.__wrapped__ = value;
Expand Down Expand Up @@ -2761,7 +2761,7 @@
*
* @private
* @param {*} value The unwrapped value.
* @param {Array} actions Actions to peform to resolve the unwrapped value.
* @param {Array} actions Actions to perform to resolve the unwrapped value.
* @returns {*} Returns the resolved value.
*/
function baseWrapperValue(value, actions) {
Expand Down Expand Up @@ -5571,7 +5571,7 @@
/**
* Creates a duplicate-free version of an array, using
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
* for equality comparisons, in which only the first occurence of each element
* for equality comparisons, in which only the first occurrence of each element
* is kept. Providing `true` for `isSorted` performs a faster search algorithm
* for sorted arrays. If an iteratee function is provided it is invoked for
* each element in the array to generate the criterion by which uniqueness
Expand Down Expand Up @@ -12448,7 +12448,7 @@

/**
* this is a mapping of keys that require shift on a US keypad
* back to the non shift equivelents
* back to the non shift equivalents
*
* this is so you can use keyup events with these keys
*
Expand Down Expand Up @@ -12504,7 +12504,7 @@

/**
* loop through the f keys, f1 to f19 and add them to the map
* programatically
* programmatically
*/
for (var i = 1; i < 20; ++i) {
_MAP[111 + i] = 'f' + i;
Expand Down Expand Up @@ -12634,7 +12634,7 @@
}

/**
* stops propogation for this event
* stops propagation for this event
*
* @param {Event} e
* @returns void
Expand Down Expand Up @@ -12952,7 +12952,7 @@
* actually calls the callback function
*
* if your callback function returns false this will use the jquery
* convention - prevent default and stop propogation on the event
* convention - prevent default and stop propagation on the event
*
* @param {Function} callback
* @param {Event} e
Expand Down Expand Up @@ -13669,7 +13669,7 @@ process.nextTick = function (fun) {
}
};

// v8 likes predictible objects
// v8 likes predictable objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
Expand Down Expand Up @@ -14671,7 +14671,7 @@ Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {
if (!ipv6Hostname) {
// IDNA Support: Returns a puny coded representation of "domain".
// It only converts the part of the domain name that
// has non ASCII characters. I.e. it dosent matter if
// has non ASCII characters. I.e. it doesn't matter if
// you call it with a domain that already is in ASCII.
var domainArray = this.hostname.split('.');
var newOut = [];
Expand Down Expand Up @@ -14981,8 +14981,8 @@ Url.prototype.resolveObject = function(relative) {
// Put this after the other two cases because it simplifies the booleans
if (psychotic) {
result.hostname = result.host = srcPath.shift();
//occationaly the auth can get stuck only in host
//this especialy happens in cases like
//occasionally the auth can get stuck only in host
//this especially happens in cases like
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
var authInHost = result.host && result.host.indexOf('@') > 0 ?
result.host.split('@') : false;
Expand Down Expand Up @@ -15063,8 +15063,8 @@ Url.prototype.resolveObject = function(relative) {
if (psychotic) {
result.hostname = result.host = isAbsolute ? '' :
srcPath.length ? srcPath.shift() : '';
//occationaly the auth can get stuck only in host
//this especialy happens in cases like
//occasionally the auth can get stuck only in host
//this especially happens in cases like
//url.resolveObject('mailto:local1@domain1', 'local2@domain2')
var authInHost = result.host && result.host.indexOf('@') > 0 ?
result.host.split('@') : false;
Expand Down Expand Up @@ -15444,7 +15444,7 @@ var platform = require('./platform');
var state = require('./state');


// Toggle sidebar with or withour animation
// Toggle sidebar with or without animation
function toggleSidebar(_state, animation) {
if (state != null && isOpen() == _state) return;
if (animation == null) animation = true;
Expand Down
2 changes: 1 addition & 1 deletion inst/rmarkdown/lua/custom-environment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Div = function (div)
table.insert(div.content[#div.content].content, pandoc.RawInline('tex', '\n' .. endEnv))
else
if (div.content[1].t ~= "Para") then
-- required trick to get correct alignement
-- required trick to get correct alignment
beginEnv = beginEnv.."\\leavevmode"
end
table.insert(div.content, 1, pandoc.RawBlock('tex', beginEnv))
Expand Down
2 changes: 1 addition & 1 deletion inst/templates/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
height: auto;
}
/* show arrow before summary tag as in bootstrap
TODO: remove if boostrap in updated in html_document (rmarkdown#1485) */
TODO: remove if bootstrap in updated in html_document (rmarkdown#1485) */
details > summary {
display: list-item;
cursor: pointer;
Expand Down
2 changes: 1 addition & 1 deletion tests/testit/test-html.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ assert("parse figure reference correctly", {
(!grepl("(#tab:foo)", res$content, fixed = TRUE))
})

assert("biblio references section is correcly found", {
assert("biblio references section is correctly found", {
# with a csl like https://www.zotero.org/styles/nature
# reference div have more attributes
html = c('<div id="references" class="section level1 unnumbered">',
Expand Down
4 changes: 2 additions & 2 deletions tests/testit/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ assert('prepend_chapter_title() adds the chapter title to the page title', {
'<title>chapter one | asdf qwer</title><meta property="og:title" content="chapter one | asdf qwer" />')
})

assert('source_files() handles several configurations correcly', {
assert('source_files() handles several configurations correctly', {
get_files = function(files = NULL, dirs = NULL, ...) {
source_files(config = list(rmd_files = files, rmd_subdir = dirs), ...)
}

# create dummy projet
# create dummy project
dir.create(project <- tempfile())
old = setwd(project)
files = c(
Expand Down

0 comments on commit 4e46a1c

Please sign in to comment.