Closed ProgramFan closed 8 years ago
My understanding is that this change allows short macros (macros with a target) to be matched. Is that a correct assumption? If so, then this change is definitely something we want. It should also allow toc::[]
and kbd:[Ctrl,T]
to be matched then.
@mojavelinux Exactly.
I have mistakenly created the pull request to merge the master branch, where I also committed some improvements in the snippets, where I changed the header styles and the block deliminaters according to recommanded asciidoc style. If this is not valid for a merge, I can revert these changes.
I would prefer if you did these as two separate pull requests. Not only does it allow us to review the changes individually, you also get credit for both changes in the history (two entries).
I have made a seperate PR for snippts and clear the CI errors. Would you please review it for possible merge? @mojavelinux
I have a minor change request. Once you address that, we can move forward.
Done.
Thank you!
@nicorikken I think this one is ready to go. Can you review? When you merge, please use "squash and merge" so we get this down to one commit.
I have merged the current state of this pull-request. I've run some basic tests on the examples given in the documentation and this tread. @ProgramFan can you provide some test-cases which previously failed and with this commit work just fine? In this way the set of tests can be expanded to cover the relevant edge-cases. Either way, thanks for this improvement.
I want to, but how can I add it? in the spec?
You can add specs in the file https://github.com/asciidoctor/atom-language-asciidoc/blob/master/spec/asciidoc-spec.coffee They describe an input line and test the expected outcome styles. You can look at the other specs for inspiration. You can run the specs from the command pallet.
@ProgramFan I've rebased my PR #46 leaving an improved spec on the block titles. I'd still like some macro tests.
Current language-asciidoc has the following flaws:
cite:[np]
are not properly reconganized.bibliography::[]
are not properly reconganized.This pull request fixes the above problems by refine the grammar definition regex. It directly enables syntax highlighting support for asciidoctor-bibtex introduced macros, namely
cite:[key]
andbibliography::[]
, and fixes block titles with '-' in words.