question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[core] When generating docs on Windows the import statement is generated incorrectly

See original GitHub issue
  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

The generated import statement should be: @material-ui/core/<Component>

Current Behavior

The generated import statement is: \packages\material-ui\src\<Component>\

Steps to Reproduce

Link:

  1. Run yarn docs:api:core on a Windows machine

Your Environment

Tech Version
Material-UI
React
Browser
TypeScript
OS Windows

Probable Cause

https://github.com/mui-org/material-ui/blob/24cc1f60a1f686c905430356c22892c121c187a1/docs/src/modules/utils/generateMarkdown.js#L368-L382

Looks like the regex only matches Unix style paths, i.e. forward slashes windows uses back slashes

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
joshwoodingcommented, Nov 9, 2018

@oliviertassinari what are your thoughts on using reactAPI.filename.split(path.sep).join('/') ?

0reactions
oliviertassinaricommented, Nov 9, 2018

If you think it’s simpler, sure, as long as it’s working, I’m happy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Import-Module (Microsoft.PowerShell.Core)
Starting in Windows PowerShell 3.0, you can use Import-Module to import Common ... Import-Module does not generate any output when it imports a...
Read more >
When Things Go Wrong — PyArmor 7.6.0 documentation
The obfuscated script is a very simple Python script, the first line is an import statement, the second line is a function call....
Read more >
SyntaxError: Cannot use import statement outside a module
js. You want to import a function from another file called some-other-file. js. some-other-file.
Read more >
Intellij IDEA cannot resolve any import statement
Hi there,. I am struggling recently with very strange issue. Suddenly, my intellij IDEA stopped resolving all java import statements.
Read more >
importlib — The implementation of import — Python 3.11.1 ...
One is to provide the implementation of the import statement (and thus, by extension, the __import__() function) in Python source code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found