Compare commits

..

4 Commits

Author SHA1 Message Date
2df97bbcac Fix parsing of numbers with plus sign
Some checks failed
Deploy Vite app to GitHub Pages / build-and-deploy (push) Has been cancelled
2026-02-15 20:13:02 +01:00
4440c1fc2b deploy for github actions added
Some checks failed
Deploy Vite app to GitHub Pages / build-and-deploy (push) Has been cancelled
2026-02-12 21:37:10 +01:00
9700f75d7c deploy for github actions added 2026-02-12 21:33:58 +01:00
d95ea2705b deploy for github actions added 2026-02-12 21:33:42 +01:00
3 changed files with 46 additions and 4 deletions

41
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Deploy Vite app to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4

View File

@@ -32,7 +32,7 @@ const SVG_CONFIG = {
/** /**
* Parse input text and identify tab lines vs annotation lines * Parse input text and identify tab lines vs annotation lines
* Adds + signs to positive numbers in tab lines * Adds + signs to positive numbers in tab lines (if not already present)
* Preserves empty lines for spacing * Preserves empty lines for spacing
*/ */
const parseInput = (text) => { const parseInput = (text) => {
@@ -42,13 +42,13 @@ const parseInput = (text) => {
// Check if line is empty // Check if line is empty
const isEmpty = line.trim().length === 0; const isEmpty = line.trim().length === 0;
// Tab lines contain only numbers, spaces, minus signs, and bend markers // Tab lines contain only numbers, spaces, +/- signs, and bend markers
const isTabLine = const isTabLine =
/^[\s\d\-'"`'']+$/.test(line.trim()) && line.trim().length > 0; /^[\s\d\+\-'"`'']+$/.test(line.trim()) && line.trim().length > 0;
let processedContent = line; let processedContent = line;
// Add + signs to positive numbers in tab lines // Add + signs to positive numbers in tab lines (only if not already present)
if (isTabLine) { if (isTabLine) {
processedContent = line.replace( processedContent = line.replace(
/(\s|^)(\d+)(['"`'']?)/g, /(\s|^)(\d+)(['"`'']?)/g,

View File

@@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react'
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()],
base: '/harmonica-tabs-image-app/',
}) })