Skip to content
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

Add Gettext lexer, samples, and spec #1405

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

shoorick
Copy link
Contributor

There are simple highlight rules for GNU Gettext

See also https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html

@pyrmont pyrmont self-assigned this Jan 23, 2020
@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Jan 23, 2020
Copy link
Contributor

@pyrmont pyrmont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry this has been outstanding for so long. Please let me know if you have any questions!

rule %r/^#[,:].*/, Comment::Special
rule %r/^#[^,:].*/, Comment

rule %r/".*?"/, Str::Double
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if a string contains "? Do these need to be escaped? Should the rule be this:

Suggested change
rule %r/".*?"/, Str::Double
rule %r/"(?:\\\\|\\"|[^"])*"/, Str::Double

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shoorick Just checking about the answer to this question.

@pyrmont pyrmont added author-action The PR has been reviewed but action by the author is needed and removed needs-review The PR needs to be reviewed labels Apr 3, 2020
@pyrmont pyrmont removed their assignment Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author-action The PR has been reviewed but action by the author is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants