Code Monkey home page Code Monkey logo

umi-plugin-md's Introduction

In the distance, a colossal mushroom cloud billowed upwards into the vast expanse of sky, its form both ominous and mesmerizing. Close by, a solitary figure stood, gazing at this spectacle with a mixture of awe and contemplation. The scene was rendered in rich hues of red, as if through the lens of an ultra-wide-angle camera that captured not just the visual drama but also the underlying symmetry inherent in nature's unpredictable grandeur. This tableau seemed to unfold like a piece of quilling art, each fold and curl backlit to accentuate the contrast between light and shadow, evoking a sense of profound depth and narrative within the frame.

IMG

AI tends to envision the world in an overly idealized manner.

umi-plugin-md's People

Contributors

chiaweilee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

xiaohuoni xyt0110

umi-plugin-md's Issues

code 样式解析错误

代码

```js
import Link from 'umi/link';

export default () => {
  <div>
    /* 普通使用 */
    <Link to="/list">Go to list page</Link>

    /* 带参数 */
    <Link to="/list?a=b">Go to list page</Link>

    /* 包含子组件 */
    <Link to="/list?a=b"><button>Go to list page</button></Link>
  </div>
}

期望效果

import Link from 'umi/link';

export default () => {
  <div>
    /* 普通使用 */
    <Link to="/list">Go to list page</Link>

    /* 带参数 */
    <Link to="/list?a=b">Go to list page</Link>

    /* 包含子组件 */
    <Link to="/list?a=b"><button>Go to list page</button></Link>
  </div>
}

实际效果

image

code解析语法错误

在代码段里面带有模版字符串,即带有反引号(`)
就会出现语法错误。

```js
# Object without property `pathname` will throw an error

image

另外样式解析还是不对


```markup
import Link from 'umi/link';

export default () => {
  <div>
    /* Normal use */
    <Link to="/list">Go to list page</Link>

    /* With query string */
    <Link to="/list?a=b">Go to list page</Link>

    /* Include child component */
    <Link to="/list?a=b"><button>Go to list page</button></Link>
  </div>
}

image
图中标示的扣号是多出来的

解析js代码时,里面的变量

比如

```js
api.modifyHTMLWithAST(($, { route, getChunkPath }) => {
  $('head').append(`<script src="${getChunkPath('a.js')}"></script>`);
});

编译之后会提示 getChunkPath 没有定义

[Error] yarn add umi-plugin-md

error /Users/xiaohuoni/Desktop/docs/node_modules/umi-plugin-md: Command failed.
Exit code: 1
Command: node ./scripts/patch.js
Arguments: 
Directory: /Users/xiaohuoni/Desktop/docs/node_modules/umi-plugin-md
Output:
fs.js:115
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/Users/xiaohuoni/Desktop/docs/node_modules/umi-plugin-md/node_modules/umi-build-dev/lib/routes/getRouteConfigFromDir.js'
    at Object.openSync (fs.js:436:3)
    at Object.readFileSync (fs.js:341:35)
    at Object._default [as default] (/Users/xiaohuoni/Desktop/docs/node_modules/umi-plugin-md/lib/patch.js:15:20)
    at Object.<anonymous> (/Users/xiaohuoni/Desktop/docs/node_modules/umi-plugin-md/scripts/patch.js:1:94)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)

锚点和id是随机值

锚点和id是一个随机值,如果有需求上的冲突希望多一个配置,支持直接使用文本
image

和我生成的导航对应不上
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.