1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-04-20 20:42:02 +02:00

Merge pull request #3602 from yarikoptic/enh-codespell

codespell: add config + workflow and make it fix some typos it finds
This commit is contained in:
Hakim El Hattab 2025-03-19 10:11:48 +01:00 committed by GitHub
commit 255d55ab8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 36 additions and 5 deletions

8
.codespellrc Normal file
View File

@ -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 =

23
.github/workflows/codespell.yml vendored Normal file
View File

@ -0,0 +1,23 @@
# Codespell configuration is within .codespellrc
---
name: Codespell
on:
push:
branches: [master]
pull_request:
branches: [master]
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

View File

@ -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";

View File

@ -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 ) ) {

View File

@ -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,"&lt;").replace(/>/g, '&gt;' );
}

View File

@ -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.

View File

@ -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() {