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

Preserve directive doesn't work as intended #723

Closed
Hirse opened this issue Jun 24, 2015 · 2 comments
Closed

Preserve directive doesn't work as intended #723

Hirse opened this issue Jun 24, 2015 · 2 comments
Milestone

Comments

@Hirse
Copy link
Contributor

Hirse commented Jun 24, 2015

  1. /* beautify preserve:end */ is ignored.
    Thus any file containing /* beautify preserve:start */ will not be correctly beautified.

    /* beautify preserve:start */
    var a  = 0;
    var aa = 1;
    /* beautify preserve:end */
    var b =  1;
  2. /* beautify preserve:start */is ignored if the ignore directory has been used before.

    /* beautify ignore:start */
    var a  = 0;
    var aa = 1;
    /* beautify ignore:end */
    var b =  2;
    /* beautify preserve:start */
    var c  = 0;
    var cc = 1;
    /* beautify preserve:end */
    var d =  1;

    becomes this after beautification:

    /* beautify ignore:start */
    var a  = 0;
    var aa = 1;
    /* beautify ignore:end */
    var b = 2;
    /* beautify preserve:start */
    var c = 0;
    var cc = 1;
    /* beautify preserve:end */
    var d = 1;
@bitwiseman bitwiseman added this to the v1.6.0 milestone Jun 24, 2015
@bitwiseman
Copy link
Member

Great report, thanks. This tells me exactly where the problem is. 👍

@bitwiseman bitwiseman changed the title Preserve directory doesn't work as intended Preserve directive doesn't work as intended Jun 24, 2015
@bitwiseman bitwiseman modified the milestones: v1.5.8, v1.6.0 Jun 24, 2015
@Hirse
Copy link
Contributor Author

Hirse commented Jun 24, 2015

Your reaction time is impressive.
And thanks for correcting the title. 😉

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