codespell: add config + workflow and make it fix some typos it finds
@@ -0,0 +1,8 @@
+[codespell]
+# Ref: https://github.com/codespell-project/codespell#using-a-config-file
+skip = .git*,package-lock.json,*.css,.codespellrc
+check-hidden = true
+# Ignore super long lines -- must be minimized etc, acronyms
+# and some near hit variables
+ignore-regex = ^.{120,}|\b(currentY|FOM)\b
+# ignore-words-list =
@@ -0,0 +1,23 @@
+# Codespell configuration is within .codespellrc
+---
+name: Codespell
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+permissions:
+ contents: read
+jobs:
+ codespell:
+ name: Check for spelling errors
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Codespell
+ uses: codespell-project/actions-codespell@v2
@@ -1,4 +1,4 @@
-// Exposes theme's variables for easy re-use in CSS for plugin authors
+// Exposes theme's variables for easy reuse in CSS for plugin authors
@use "sass:color";
@@ -74,7 +74,7 @@ export default class JumpToSlide {
let query = this.jumpInput.value.trim( '' );
let indices;
- // When slide numbers are formatted to be a single linear mumber
+ // When slide numbers are formatted to be a single linear number
// (instead of showing a separate horizontal/vertical index) we
// use the same format for slide jumps
if( /^\d+$/.test( query ) ) {
@@ -52,7 +52,7 @@ const Plugin = {
block.innerHTML = betterTrim( block );
}
- // Escape HTML tags unless the "data-noescape" attrbute is present
+ // Escape HTML tags unless the "data-noescape" attribute is present
if( config.escapeHTML && !block.hasAttribute( 'data-noescape' )) {
block.innerHTML = block.innerHTML.replace( /</g,"<").replace(/>/g, '>' );
@@ -229,7 +229,7 @@ const Plugin = () => {
openSpeakerWindow();
else {
- // Keep listening for speaker view hearbeats. If we receive a
+ // Keep listening for speaker view heartbeats. If we receive a
// heartbeat from an orphaned window, reconnect it. This ensures
// that we remain connected to the notes even if the presentation
// is reloaded.
@@ -147,7 +147,7 @@ var zoom = (function(){
/**
- * Pan the document when the mosue cursor approaches the edges
+ * Pan the document when the mouse cursor approaches the edges
* of the window.
*/
function pan() {