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

Edit/Update Removal can eliminate too much white space. #46

Closed
mogsdad opened this issue Feb 4, 2016 · 1 comment
Closed

Edit/Update Removal can eliminate too much white space. #46

mogsdad opened this issue Feb 4, 2016 · 1 comment

Comments

@mogsdad
Copy link
Contributor

mogsdad commented Feb 4, 2016

Script: Magic™ Editor
Issue type: Bug
Link to example post: (where can the problem be reliably replicated?)

This:

Generally i need to pick up `authData` and `RequestData` elements to the one level up (or to delete `processRequestRequest` element).


**UPDATE**

> Spring WS offers "only" contract-first, starting from an XSD Schema

...gets changed to this:

Generally I need to pick up `authData` and `RequestData` elements to the one level up (or to delete `processRequestRequest` element).> Spring WS offers "only" contract-first, starting from an XSD Schema

...it should be this:

Generally I need to pick up `authData` and `RequestData` elements to the one level up (or to delete `processRequestRequest` element).

> Spring WS offers "only" contract-first, starting from an XSD Schema

...but the white space between the Block-quote and the preceding sentence has been removed.

Observed in this edit, for example.

With App.globals.showRules = true;, isolated the problem to an apparent interaction between two rules, editupdate and blanklines, shown below. Debug info didn't show any unexpected replacement, so perhaps there is a third player? (Placeholder logic, maybe?)

With either rule disabled, there's no problem (but that the rule isn't doing its job).

        editupdate: {
            // https://regex101.com/r/tT2pK6/9
            expr: /([-_*]+[\t ]*\b(edit|update)\b([\t ]*#?[0-9]+)?[\t ]*:*[\t ]*[-_*]+:*|[\t ]*\b(edit|update)\b([\t ]*#?[0-9]+)?\s*:+[\t ]*)/gi,
            replacement: "",
            reason: App.consts.reasons.noise
        },

...
        blanklines: {  // https://regex101.com/r/eA5hA2/2
            expr: /^(?: *[\n\r\f])+|(?: *[\n\r\f])+$|((?: *[\n\r\f]){2})(?:(?: *[\n\r\f]))+/g,
            replacement: "$1",
            reason: App.consts.reasons.layout
        },

This might be related to issue #39 , in that the placeholders / block replacement logic could be involved.

(Migrated from old repository #115.)

@makyen
Copy link
Contributor

makyen commented Aug 31, 2017

This appears to have been previously resolved. The edits provided as test cases no longer appear to have the problem.

@makyen makyen closed this as completed Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants