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

Cannot extract the multiline comments because regex does not seem to match #22

Open
pronebird opened this issue Feb 22, 2019 · 2 comments

Comments

@pronebird
Copy link

pronebird commented Feb 22, 2019

Hi,

Trying to extract the multine comment that goes as this:

/* TRANSLATORS:
    Line 1
    Line 2
*/
pgettext('context', 'key')

Using the following options for comments:

{
    // take the comment from the preceding line
    otherLineLeading: true,

    // run the comment through regex
    regex: /TRANSLATORS\:\s*(.*)/m
};

It works for single line comments but not for multiline ones. Any idea how to tackle this?

Same happens if I remove the regex option and only leave the otherLineLeading: true

@lukasgeiter
Copy link
Owner

Hi, as stated in the wiki, multiline comments are currently not supported. I will look into adding this feature with the next release.

In the meantime, as a workaround you could use multiple single line comments:

// TRANSLATORS: Line 1
// TRANSLATORS: Line 2
pgettext('context', 'key')

@pronebird
Copy link
Author

pronebird commented Feb 22, 2019

Hi, as stated in the wiki, multiline comments are currently not supported.

Ugh my bad, it seems that I've missed this mention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants