Comments (4)
@gpr19 I think if found the issue, and I merged a fix. Will try to publish it soon 👍
from chordsheetjs.
Hey @gpr19. Thanks for reaching out!
Could you elaborate on the code that is used to render the sheet? It would be nice to have the minimal bit of code that breaks on 9.0.1 or returns a different result.
from chordsheetjs.
I'm experiencing this issue, for example, with this setup:
- Parser: ChordsOverWordsParser
- Formatter: HtmlTableFormatter
- Sheet:
const sheet = ` F Am Dm Gm C
Tonight I’m gonna have myself a real good time, I feel alive
F F7 Bb Gm7 D7
And the world, I'll turn it inside out yeah, I'm floating around in ecstasy
Gm F C Gm Gm F C
So don’t stop me now, don’t stop me
Gm F/G Gm7 C Dm7/C C7
Cause I’m having a good time, having a good time
`;
The last empty line will produce a null being displayed, as you can see in this image:
This could be fixed by the client that is using the ChordSheetJS library by just trimming the sheet, but it would be great if the library could handle this scenario by itself.
from chordsheetjs.
The same happens when two or more line breaks appear together in the middle of the sheet.
Here is the fix that I'm using before calling the ChordsOverWordsParser class:
phraseToParse = phraseToParse.replace(/\n\n/g, '\n').trim();
Does it make sense to include the fix in the ChordsOverWordsParser parser method?
from chordsheetjs.
Related Issues (20)
- How to detect the current key? HOT 4
- ChordSheetJS with ChordProject HOT 3
- Contributing: error with yarn test (Windows) HOT 2
- Is it wrong to use Transpose in a song that modulates within a song? HOT 1
- Tab support for ChordPro parsing: PeggySyntaxError: Expected "#", "%", "[", "\\", "]", "{", "|", or "}" but "3" found. HOT 2
- Enharmonics with key change
- Custom HtmlFormatter HOT 2
- 'husky' is not recognized as an internal or external command HOT 3
- Attempting to parse `{start_of_abc}` directives throws exceptions HOT 3
- Suspended chords HOT 2
- Changing to # or b for entire song HOT 2
- Chord.normalize() does not normalize some slash chords properly HOT 3
- Support for `start_of_textblock`
- Issue importing Chord in TypeScript HOT 8
- Error with sot / eot HOT 2
- Tab support for `ChordsOverWordsFormatter`
- Support for `start_of_svg`
- HtmlDivFormatter behaves differently than HtmlTableFormatter HOT 4
- New "Intro" chords category ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chordsheetjs.