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

Fix: Backslash not escaped when requiring riot at top of tag #2216

Closed
wants to merge 1 commit into from

Conversation

@OhYea777
Copy link

OhYea777 commented Jan 12, 2017

Code

  1. Have you added test(s) for your patch? If not, why not?
    Unable to add tests as problem only exists in a Windows environment

  2. Can you provide an example of your patch in use?
    Error pre-fix:

Error: Cannot find module 'C:UsersVengeanceDownloadsDevelopmentJavaScriptNode.  jseden
  ode_modules iot iot'

  - module.js:470 Function.Module._resolveFilename
    module.js:470:15

  - module.js:418 Function.Module._load
    module.js:418:25

  - module.js:498 Module.require
    module.js:498:17

  - module.js:20 require
    internal/module.js:20:19

  - users-admin.tag:2 Object.<anonymous>
    C:/Users/Vengeance/Downloads/Development/JavaScript/Node.js/eden/app/cache/v    iews/users-admin.tag:2:16

  - module.js:571 Module._compile
    module.js:571:32

  - index.js:28 loadAndCompile
    [eden]/[riot]/lib/server/index.js:28:11

Post-fix: No error is present and riot begins to render as normal.

  1. Is this a breaking change?
    For Windows, yes it is, as windows uses '\' for path separation.

Content

Changed './lib/server/index.js' to sanitize backslashes for requiring riot at the top of tag files.

GianlucaGuarini added a commit that referenced this pull request Jan 15, 2017
@GianlucaGuarini

This comment has been minimized.

Copy link
Member

GianlucaGuarini commented Jan 15, 2017

@OhYea777 could you please test my patch? Here in my windows10 everything seems to work fine

@GianlucaGuarini

This comment has been minimized.

Copy link
Member

GianlucaGuarini commented Jan 17, 2017

I guess it was fixed with my patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.