-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(compiler): add dtx format support #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. 😄
Is the only difference between DTX and BMS format is the space after the colon?
If so, in my opinion, we can use the same matcher by making BMS parser also allow extra space.
Not only space, there also colon after header name. |
I see, so that’s more than just whitespace issue. Thanks for the clarification! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you address this comment? Then it should be ready to merge :)
compiler/index.js
Outdated
var matcher = matchers.bms | ||
|
||
if (options.format === 'dtx') { | ||
matcher = matchers.dtx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid reassigning more variables than necessary, I recommend compacting these five lines into one:
var matcher = matchers[options.format] || matchers.bms
I missed this one: There is also a documentation block at the top of the function. Can you add the |
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
No description provided.