-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
# runic: (off|on)
toggle comments
This patch implements `# runic: on` and `# runic: off` toggle comments that can be included in the source to toggle formatting on/off. The two comments i) must be placed on their own lines, ii) must be on the same level in the expression tree, and iii) must come in pairs. An exception to condition iii) is made for top level toggle comments so that formatting for a whole file can be disabled by a `# runic: off` comment at the top without having to add one also at the end of the file. For compatibility with JuliaFormatter, `#! format: (on|off)` is also supported but it is not possible to pair e.g. a `# runic: off` comment with a `#! format: on` comment. Closes #12, closes #41.
- Loading branch information
1 parent
2c455a0
commit 6e8bf7c
Showing
3 changed files
with
214 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters