diff --git a/.Rbuildignore b/.Rbuildignore
index c71af55..5a55829 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -9,3 +9,4 @@
^_pkgdown\.yml$
^pkgdown$
^\.github$
+^CRAN-RELEASE$
diff --git a/.gitignore b/.gitignore
index 10c71b2..09a72cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,3 @@
.Rhistory
.RData
inst/doc
-docs
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6c03f9e..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-language: r
-warnings_are_errors: false
-sudo: required
-r_github_packages:
- - jimhester/covr
-after_success:
- - Rscript -e 'covr::coveralls()'
- - Rscript -e 'pkgdown::build_site()'
-
-deploy:
- provider: pages
- skip-cleanup: true
- github-token: $GITHUB_PAT
- keep-history: true
- local-dir: docs
- on:
- branch: master
diff --git a/CRAN-RELEASE b/CRAN-RELEASE
new file mode 100644
index 0000000..3f1d48b
--- /dev/null
+++ b/CRAN-RELEASE
@@ -0,0 +1,2 @@
+This package was submitted to CRAN on 2021-04-18.
+Once it is accepted, delete this file and tag the release (commit 28f86f0).
diff --git a/DESCRIPTION b/DESCRIPTION
index 82a1b75..b622ece 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,17 +1,27 @@
Package: phonenumber
Title: Convert Letters to Numbers and Back as on a Telephone Keypad
Version: 0.2.3
-Authors@R: person("Steve", "Myles", email = "steve@mylesandmyles.info", role = c("aut", "cre"))
-Description: Convert English letters to numbers or numbers to English letters as
- on a telephone keypad. When converting letters to numbers, a character
- vector is returned with "A," "B," or "C" becoming 2, "D," "E", or "F"
- becoming 3, etc. When converting numbers to letters, a character vector is
- returned with multiple elements (i.e., "2" becomes a vector of "A," "B," and
- "C").
-URL: https://stevemyles.site/phonenumber/, https://github.com/scumdogsteev/phonenumber
-BugReports: https://github.com/scumdogsteev/phonenumber/issues
-Depends: R (>= 3.1.3)
+Authors@R:
+ person(given = "Steve",
+ family = "Myles",
+ role = c("aut", "cre"),
+ email = "steve@mylesandmyles.info")
+Description: Convert English letters to numbers or numbers to English
+ letters as on a telephone keypad. When converting letters to numbers,
+ a character vector is returned with "A," "B," or "C" becoming 2, "D,"
+ "E", or "F" becoming 3, etc. When converting numbers to letters, a
+ character vector is returned with multiple elements (i.e., "2" becomes
+ a vector of "A," "B," and "C").
License: MIT + file LICENSE
-VignetteBuilder: knitr
-Suggests: knitr, rmarkdown,
+URL: https://stevemyles.site/phonenumber/,
+ https://github.com/scumdogsteev/phonenumber
+BugReports: https://github.com/scumdogsteev/phonenumber/issues
+Depends:
+ R (>= 3.1.3)
+Suggests:
+ knitr,
+ rmarkdown,
testthat
+VignetteBuilder:
+ knitr
+Encoding: UTF-8
diff --git a/README.Rmd b/README.Rmd
index 400f2d8..03ba551 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -15,20 +15,9 @@ knitr::opts_chunk$set(
# phonenumber
-[![R-CMD-check](https://github.com/scumdogsteev/phonenumber/workflows/R-CMD-check/badge.svg)](https://github.com/scumdogsteev/phonenumber/actions)[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/phonenumber)](http://cran.r-project.org/package=phonenumber) [![Travis-CI Build Status](https://travis-ci.org/scumdogsteev/phonenumber.svg?branch=master)](https://travis-ci.org/scumdogsteev/phonenumber) [![Appveyor Build status](https://ci.appveyor.com/api/projects/status/f9cm5ixhl4934dck?svg=true)](https://ci.appveyor.com/project/scumdogsteev/phonenumber) [![Coverage Status](https://coveralls.io/repos/scumdogsteev/phonenumber/badge.svg?branch=master&service=github)](https://coveralls.io/github/scumdogsteev/phonenumber?branch=master) [![RStudio CRAN mirror downloads](http://cranlogs.r-pkg.org/badges/grand-total/phonenumber)](http://cran.rstudio.com/web/packages/phonenumber/index.html)
+[![R-CMD-check](https://github.com/scumdogsteev/phonenumber/workflows/R-CMD-check/badge.svg)](https://github.com/scumdogsteev/phonenumber/actions)[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/phonenumber)](https://cran.r-project.org/package=phonenumber) [![Coverage Status](https://coveralls.io/repos/scumdogsteev/phonenumber/badge.svg?branch=master&service=github)](https://coveralls.io/github/scumdogsteev/phonenumber?branch=master) [![RStudio CRAN mirror downloads](https://cranlogs.r-pkg.org/badges/grand-total/phonenumber)](https://cran.rstudio.com/package=phonenumber)
-**`phonenumber`** converts English letters to numbers or
-numbers to English letters as on a telephone keypad.
-
-Author: Steve Myles
-
-Project Home: http://stevemyles.site/phonenumber/
-
-Blog Post: https://stevemyles.site/blog/2015/07/12/phonenumber/
-
-License: MIT license
-
### Background
When I recently posted some of my [Turbo Pascal Stuff](https://stevemyles.site/blog/2015/06/19/turbo-pascal-stuff/), I found an incomplete
diff --git a/README.md b/README.md
index 4de67fc..c61fdd3 100644
--- a/README.md
+++ b/README.md
@@ -1,32 +1,17 @@
-# phonenumber
+# phonenumber
-[![R-CMD-check](https://github.com/scumdogsteev/phonenumber/workflows/R-CMD-check/badge.svg)](https://github.com/scumdogsteev/phonenumber/actions)[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/phonenumber)](http://cran.r-project.org/package=phonenumber)
-[![Travis-CI Build
-Status](https://travis-ci.org/scumdogsteev/phonenumber.svg?branch=master)](https://travis-ci.org/scumdogsteev/phonenumber)
-[![Appveyor Build
-status](https://ci.appveyor.com/api/projects/status/f9cm5ixhl4934dck?svg=true)](https://ci.appveyor.com/project/scumdogsteev/phonenumber)
+[![R-CMD-check](https://github.com/scumdogsteev/phonenumber/workflows/R-CMD-check/badge.svg)](https://github.com/scumdogsteev/phonenumber/actions)[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/phonenumber)](https://cran.r-project.org/package=phonenumber)
[![Coverage
Status](https://coveralls.io/repos/scumdogsteev/phonenumber/badge.svg?branch=master&service=github)](https://coveralls.io/github/scumdogsteev/phonenumber?branch=master)
[![RStudio CRAN mirror
-downloads](http://cranlogs.r-pkg.org/badges/grand-total/phonenumber)](http://cran.rstudio.com/web/packages/phonenumber/index.html)
+downloads](https://cranlogs.r-pkg.org/badges/grand-total/phonenumber)](https://cran.rstudio.com/package=phonenumber)
-**`phonenumber`** converts English letters to numbers or numbers to
-English letters as on a telephone keypad.
-
-Author: Steve Myles
-
-Project Home:
-
-Blog Post:
-
-License: MIT license
-
### Background
When I recently posted some of my [Turbo Pascal
diff --git a/_pkgdown.yml b/_pkgdown.yml
index 1829d6c..6e800fa 100644
--- a/_pkgdown.yml
+++ b/_pkgdown.yml
@@ -14,12 +14,14 @@ navbar:
href: index.html
- text: "Documentation"
href: articles/phonenumber.html
- - text: "Functions"
+ - text: "Reference"
href: reference/index.html
- - text: "News"
+ - text: "Changelog"
href: news/index.html
right:
- icon: fa-github fa-lg
href: https://github.com/scumdogsteev/phonenumber
+ - icon: fa-info-circle fa-lg
+ href: https://stevemyles.site/blog/2015/07/12/phonenumber/
- icon: fa-arrow-circle-up fa-lg
href: https://stevemyles.site/
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index 7d1c45b..0000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-# DO NOT CHANGE the "init" and "install" sections below
-
-# Download script file from GitHub
-init:
- ps: |
- $ErrorActionPreference = "Stop"
- Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
- Import-Module '..\appveyor-tool.ps1'
-
-install:
- ps: Bootstrap
-
-# Adapt as necessary starting from here
-
-build_script:
- - travis-tool.sh install_deps
-
-test_script:
- - travis-tool.sh run_tests
-
-on_failure:
- - travis-tool.sh dump_logs
-
-artifacts:
- - path: '*.Rcheck\**\*.log'
- name: Logs
-
- - path: '*.Rcheck\**\*.out'
- name: Logs
-
- - path: '*.Rcheck\**\*.fail'
- name: Logs
-
- - path: '*.Rcheck\**\*.Rout'
- name: Logs
-
- - path: '\*_*.tar.gz'
- name: Bits
-
- - path: '\*_*.zip'
- name: Bits
diff --git a/docs/404.html b/docs/404.html
new file mode 100644
index 0000000..fd8a126
--- /dev/null
+++ b/docs/404.html
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+Page not found (404) • phonenumber
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Content not found. Please use links in the navbar.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html
new file mode 100644
index 0000000..b704b74
--- /dev/null
+++ b/docs/LICENSE-text.html
@@ -0,0 +1,173 @@
+
+
+
+
+
+
+
+
+License • phonenumber
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
YEAR: 2015
+COPYRIGHT HOLDER: Steve Myles
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/apple-touch-icon-120x120.png b/docs/apple-touch-icon-120x120.png
new file mode 100644
index 0000000..3e90247
Binary files /dev/null and b/docs/apple-touch-icon-120x120.png differ
diff --git a/docs/apple-touch-icon-152x152.png b/docs/apple-touch-icon-152x152.png
new file mode 100644
index 0000000..22d4063
Binary files /dev/null and b/docs/apple-touch-icon-152x152.png differ
diff --git a/docs/apple-touch-icon-180x180.png b/docs/apple-touch-icon-180x180.png
new file mode 100644
index 0000000..b102f64
Binary files /dev/null and b/docs/apple-touch-icon-180x180.png differ
diff --git a/docs/apple-touch-icon-60x60.png b/docs/apple-touch-icon-60x60.png
new file mode 100644
index 0000000..0c9b33d
Binary files /dev/null and b/docs/apple-touch-icon-60x60.png differ
diff --git a/docs/apple-touch-icon-76x76.png b/docs/apple-touch-icon-76x76.png
new file mode 100644
index 0000000..174625c
Binary files /dev/null and b/docs/apple-touch-icon-76x76.png differ
diff --git a/docs/apple-touch-icon.png b/docs/apple-touch-icon.png
new file mode 100644
index 0000000..641ae54
Binary files /dev/null and b/docs/apple-touch-icon.png differ
diff --git a/docs/articles/index.html b/docs/articles/index.html
index 8e3d0f5..58522f6 100644
--- a/docs/articles/index.html
+++ b/docs/articles/index.html
@@ -95,10 +95,10 @@
Documentation
- Functions
+ Reference
- News
+ Changelog
@@ -108,6 +108,12 @@
+-
+
+
+
+
+
-
diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css
new file mode 100644
index 0000000..5a85941
--- /dev/null
+++ b/docs/bootstrap-toc.css
@@ -0,0 +1,60 @@
+/*!
+ * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/)
+ * Copyright 2015 Aidan Feldman
+ * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */
+
+/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */
+
+/* All levels of nav */
+nav[data-toggle='toc'] .nav > li > a {
+ display: block;
+ padding: 4px 20px;
+ font-size: 13px;
+ font-weight: 500;
+ color: #767676;
+}
+nav[data-toggle='toc'] .nav > li > a:hover,
+nav[data-toggle='toc'] .nav > li > a:focus {
+ padding-left: 19px;
+ color: #563d7c;
+ text-decoration: none;
+ background-color: transparent;
+ border-left: 1px solid #563d7c;
+}
+nav[data-toggle='toc'] .nav > .active > a,
+nav[data-toggle='toc'] .nav > .active:hover > a,
+nav[data-toggle='toc'] .nav > .active:focus > a {
+ padding-left: 18px;
+ font-weight: bold;
+ color: #563d7c;
+ background-color: transparent;
+ border-left: 2px solid #563d7c;
+}
+
+/* Nav: second level (shown on .active) */
+nav[data-toggle='toc'] .nav .nav {
+ display: none; /* Hide by default, but at >768px, show it */
+ padding-bottom: 10px;
+}
+nav[data-toggle='toc'] .nav .nav > li > a {
+ padding-top: 1px;
+ padding-bottom: 1px;
+ padding-left: 30px;
+ font-size: 12px;
+ font-weight: normal;
+}
+nav[data-toggle='toc'] .nav .nav > li > a:hover,
+nav[data-toggle='toc'] .nav .nav > li > a:focus {
+ padding-left: 29px;
+}
+nav[data-toggle='toc'] .nav .nav > .active > a,
+nav[data-toggle='toc'] .nav .nav > .active:hover > a,
+nav[data-toggle='toc'] .nav .nav > .active:focus > a {
+ padding-left: 28px;
+ font-weight: 500;
+}
+
+/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */
+nav[data-toggle='toc'] .nav > .active > ul {
+ display: block;
+}
diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js
new file mode 100644
index 0000000..1cdd573
--- /dev/null
+++ b/docs/bootstrap-toc.js
@@ -0,0 +1,159 @@
+/*!
+ * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/)
+ * Copyright 2015 Aidan Feldman
+ * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */
+(function() {
+ 'use strict';
+
+ window.Toc = {
+ helpers: {
+ // return all matching elements in the set, or their descendants
+ findOrFilter: function($el, selector) {
+ // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/
+ // http://stackoverflow.com/a/12731439/358804
+ var $descendants = $el.find(selector);
+ return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])');
+ },
+
+ generateUniqueIdBase: function(el) {
+ var text = $(el).text();
+ var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-');
+ return anchor || el.tagName.toLowerCase();
+ },
+
+ generateUniqueId: function(el) {
+ var anchorBase = this.generateUniqueIdBase(el);
+ for (var i = 0; ; i++) {
+ var anchor = anchorBase;
+ if (i > 0) {
+ // add suffix
+ anchor += '-' + i;
+ }
+ // check if ID already exists
+ if (!document.getElementById(anchor)) {
+ return anchor;
+ }
+ }
+ },
+
+ generateAnchor: function(el) {
+ if (el.id) {
+ return el.id;
+ } else {
+ var anchor = this.generateUniqueId(el);
+ el.id = anchor;
+ return anchor;
+ }
+ },
+
+ createNavList: function() {
+ return $('');
+ },
+
+ createChildNavList: function($parent) {
+ var $childList = this.createNavList();
+ $parent.append($childList);
+ return $childList;
+ },
+
+ generateNavEl: function(anchor, text) {
+ var $a = $('');
+ $a.attr('href', '#' + anchor);
+ $a.text(text);
+ var $li = $('
');
+ $li.append($a);
+ return $li;
+ },
+
+ generateNavItem: function(headingEl) {
+ var anchor = this.generateAnchor(headingEl);
+ var $heading = $(headingEl);
+ var text = $heading.data('toc-text') || $heading.text();
+ return this.generateNavEl(anchor, text);
+ },
+
+ // Find the first heading level (``, then ``, etc.) that has more than one element. Defaults to 1 (for ``).
+ getTopLevel: function($scope) {
+ for (var i = 1; i <= 6; i++) {
+ var $headings = this.findOrFilter($scope, 'h' + i);
+ if ($headings.length > 1) {
+ return i;
+ }
+ }
+
+ return 1;
+ },
+
+ // returns the elements for the top level, and the next below it
+ getHeadings: function($scope, topLevel) {
+ var topSelector = 'h' + topLevel;
+
+ var secondaryLevel = topLevel + 1;
+ var secondarySelector = 'h' + secondaryLevel;
+
+ return this.findOrFilter($scope, topSelector + ',' + secondarySelector);
+ },
+
+ getNavLevel: function(el) {
+ return parseInt(el.tagName.charAt(1), 10);
+ },
+
+ populateNav: function($topContext, topLevel, $headings) {
+ var $context = $topContext;
+ var $prevNav;
+
+ var helpers = this;
+ $headings.each(function(i, el) {
+ var $newNav = helpers.generateNavItem(el);
+ var navLevel = helpers.getNavLevel(el);
+
+ // determine the proper $context
+ if (navLevel === topLevel) {
+ // use top level
+ $context = $topContext;
+ } else if ($prevNav && $context === $topContext) {
+ // create a new level of the tree and switch to it
+ $context = helpers.createChildNavList($prevNav);
+ } // else use the current $context
+
+ $context.append($newNav);
+
+ $prevNav = $newNav;
+ });
+ },
+
+ parseOps: function(arg) {
+ var opts;
+ if (arg.jquery) {
+ opts = {
+ $nav: arg
+ };
+ } else {
+ opts = arg;
+ }
+ opts.$scope = opts.$scope || $(document.body);
+ return opts;
+ }
+ },
+
+ // accepts a jQuery object, or an options object
+ init: function(opts) {
+ opts = this.helpers.parseOps(opts);
+
+ // ensure that the data attribute is in place for styling
+ opts.$nav.attr('data-toggle', 'toc');
+
+ var $topContext = this.helpers.createChildNavList(opts.$nav);
+ var topLevel = this.helpers.getTopLevel(opts.$scope);
+ var $headings = this.helpers.getHeadings(opts.$scope, topLevel);
+ this.helpers.populateNav($topContext, topLevel, $headings);
+ }
+ };
+
+ $(function() {
+ $('nav[data-toggle="toc"]').each(function(i, el) {
+ var $nav = $(el);
+ Toc.init($nav);
+ });
+ });
+})();
diff --git a/docs/docsearch.css b/docs/docsearch.css
new file mode 100644
index 0000000..e5f1fe1
--- /dev/null
+++ b/docs/docsearch.css
@@ -0,0 +1,148 @@
+/* Docsearch -------------------------------------------------------------- */
+/*
+ Source: https://github.com/algolia/docsearch/
+ License: MIT
+*/
+
+.algolia-autocomplete {
+ display: block;
+ -webkit-box-flex: 1;
+ -ms-flex: 1;
+ flex: 1
+}
+
+.algolia-autocomplete .ds-dropdown-menu {
+ width: 100%;
+ min-width: none;
+ max-width: none;
+ padding: .75rem 0;
+ background-color: #fff;
+ background-clip: padding-box;
+ border: 1px solid rgba(0, 0, 0, .1);
+ box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175);
+}
+
+@media (min-width:768px) {
+ .algolia-autocomplete .ds-dropdown-menu {
+ width: 175%
+ }
+}
+
+.algolia-autocomplete .ds-dropdown-menu::before {
+ display: none
+}
+
+.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] {
+ padding: 0;
+ background-color: rgb(255,255,255);
+ border: 0;
+ max-height: 80vh;
+}
+
+.algolia-autocomplete .ds-dropdown-menu .ds-suggestions {
+ margin-top: 0
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion {
+ padding: 0;
+ overflow: visible
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--category-header {
+ padding: .125rem 1rem;
+ margin-top: 0;
+ font-size: 1.3em;
+ font-weight: 500;
+ color: #00008B;
+ border-bottom: 0
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--wrapper {
+ float: none;
+ padding-top: 0
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column {
+ float: none;
+ width: auto;
+ padding: 0;
+ text-align: left
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--content {
+ float: none;
+ width: auto;
+ padding: 0
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--content::before {
+ display: none
+}
+
+.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header {
+ padding-top: .75rem;
+ margin-top: .75rem;
+ border-top: 1px solid rgba(0, 0, 0, .1)
+}
+
+.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column {
+ display: block;
+ padding: .1rem 1rem;
+ margin-bottom: 0.1;
+ font-size: 1.0em;
+ font-weight: 400
+ /* display: none */
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--title {
+ display: block;
+ padding: .25rem 1rem;
+ margin-bottom: 0;
+ font-size: 0.9em;
+ font-weight: 400
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--text {
+ padding: 0 1rem .5rem;
+ margin-top: -.25rem;
+ font-size: 0.8em;
+ font-weight: 400;
+ line-height: 1.25
+}
+
+.algolia-autocomplete .algolia-docsearch-footer {
+ width: 110px;
+ height: 20px;
+ z-index: 3;
+ margin-top: 10.66667px;
+ float: right;
+ font-size: 0;
+ line-height: 0;
+}
+
+.algolia-autocomplete .algolia-docsearch-footer--logo {
+ background-image: url("data:image/svg+xml;utf8,");
+ background-repeat: no-repeat;
+ background-position: 50%;
+ background-size: 100%;
+ overflow: hidden;
+ text-indent: -9000px;
+ width: 100%;
+ height: 100%;
+ display: block;
+ transform: translate(-8px);
+}
+
+.algolia-autocomplete .algolia-docsearch-suggestion--highlight {
+ color: #FF8C00;
+ background: rgba(232, 189, 54, 0.1)
+}
+
+
+.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight {
+ box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5)
+}
+
+.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content {
+ background-color: rgba(192, 192, 192, .15)
+}
diff --git a/docs/docsearch.js b/docs/docsearch.js
new file mode 100644
index 0000000..b35504c
--- /dev/null
+++ b/docs/docsearch.js
@@ -0,0 +1,85 @@
+$(function() {
+
+ // register a handler to move the focus to the search bar
+ // upon pressing shift + "/" (i.e. "?")
+ $(document).on('keydown', function(e) {
+ if (e.shiftKey && e.keyCode == 191) {
+ e.preventDefault();
+ $("#search-input").focus();
+ }
+ });
+
+ $(document).ready(function() {
+ // do keyword highlighting
+ /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */
+ var mark = function() {
+
+ var referrer = document.URL ;
+ var paramKey = "q" ;
+
+ if (referrer.indexOf("?") !== -1) {
+ var qs = referrer.substr(referrer.indexOf('?') + 1);
+ var qs_noanchor = qs.split('#')[0];
+ var qsa = qs_noanchor.split('&');
+ var keyword = "";
+
+ for (var i = 0; i < qsa.length; i++) {
+ var currentParam = qsa[i].split('=');
+
+ if (currentParam.length !== 2) {
+ continue;
+ }
+
+ if (currentParam[0] == paramKey) {
+ keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20"));
+ }
+ }
+
+ if (keyword !== "") {
+ $(".contents").unmark({
+ done: function() {
+ $(".contents").mark(keyword);
+ }
+ });
+ }
+ }
+ };
+
+ mark();
+ });
+});
+
+/* Search term highlighting ------------------------------*/
+
+function matchedWords(hit) {
+ var words = [];
+
+ var hierarchy = hit._highlightResult.hierarchy;
+ // loop to fetch from lvl0, lvl1, etc.
+ for (var idx in hierarchy) {
+ words = words.concat(hierarchy[idx].matchedWords);
+ }
+
+ var content = hit._highlightResult.content;
+ if (content) {
+ words = words.concat(content.matchedWords);
+ }
+
+ // return unique words
+ var words_uniq = [...new Set(words)];
+ return words_uniq;
+}
+
+function updateHitURL(hit) {
+
+ var words = matchedWords(hit);
+ var url = "";
+
+ if (hit.anchor) {
+ url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor;
+ } else {
+ url = hit.url + '?q=' + escape(words.join(" "));
+ }
+
+ return url;
+}
diff --git a/docs/favicon-16x16.png b/docs/favicon-16x16.png
new file mode 100644
index 0000000..a109e49
Binary files /dev/null and b/docs/favicon-16x16.png differ
diff --git a/docs/favicon-32x32.png b/docs/favicon-32x32.png
new file mode 100644
index 0000000..51460e7
Binary files /dev/null and b/docs/favicon-32x32.png differ
diff --git a/docs/favicon.ico b/docs/favicon.ico
new file mode 100644
index 0000000..8bba7c8
Binary files /dev/null and b/docs/favicon.ico differ
diff --git a/docs/index.html b/docs/index.html
index 045f3af..dca67a1 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -18,12 +18,12 @@
-
+
-
phonenumber
converts English letters to numbers or numbers to English letters as on a telephone keypad.
-Author: Steve Myles
-Project Home: http://stevemyles.site/phonenumber/
-Blog Post: https://stevemyles.site/blog/2015/07/12/phonenumber/
-License: MIT license
Background
@@ -227,11 +228,9 @@
Developers
Dev status
diff --git a/docs/logo.png b/docs/logo.png
new file mode 100644
index 0000000..34a2d15
Binary files /dev/null and b/docs/logo.png differ
diff --git a/docs/news/index.html b/docs/news/index.html
index 4d9b8f8..4e8d94a 100644
--- a/docs/news/index.html
+++ b/docs/news/index.html
@@ -95,10 +95,10 @@
Documentation
-
- Functions
+ Reference
-
- News
+ Changelog