Comments (4)
It was very nice, thanks!
I've been reading over the fountain.io spec and the details are somewhat scant regarding the interpretation.
A Character element is any line entirely in uppercase, with one empty line before it and without an empty line after it.
STEEL The man’s a myth!
...
Character names must include at least one alphabetical character. (emphasis mine) “R2D2” works, but “23” does not.
What this tells me is that nothing indicates a special character cannot be used, but to be fair to the original regex writer, it's not specific either. For example, I think you can interpret the "at least one alphabetical character" plus example to mean all names must start with an alphabetical character as the original author of our library did; however, you can also interpret that the specification means anywhere, so something like 1D2
should be valid, since August doesn't say where the alphabetical character should be.
In fact, digging into @nyousefi's original Regexes, you can see they don't discriminate that much but confusingly they also seems to allow 23
, which could have been an accident on my part interpreting the regex since I don't do much Objective-C.
So, to dispel that confusion, I jumped into Highland 2, which accepts names like 1D2
but not 23
(except when forced @
) and also, happily, DISGRUNTLED CITIZEN #1
works perfectly fine too!
Given this, I think it's fair to say, you're right and this is a flaw in the original regex.
Here's my (modified) attempt at a regex that tries to conform to all of the patterns as best I can. It isn't pretty but works as far as I can tell. If it looks good, I'll try this out tomorrow and write some new tests to make sure it doesn't break anything else.
from fountain-js.
Just updated and tested. Looking good! Thanks!
from fountain-js.
from fountain-js.
Thanks! I hope you enjoyed the backpacking, and I appreciate the quick response.
from fountain-js.
Related Issues (7)
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 fountain-js.