progital / gatsby-wpgraphql-inline-images

Solution for Gatsby and WPGraphQL sourced content. Downloads images locally.
MIT License
35 stars 12 forks source link

Same page anchor links being removed #24

Closed robmarshall closed 4 years ago

robmarshall commented 4 years ago

Hi,

When content is parsed from the editor it is removing anchor links.

Within the WordPress I have content that is set up like:

<a href="#what-is-an-actor">What is an Actor?</a>

However, when this is run through the parser the content is returned as:

<a class=" css-0" href="/">What is an Actor?</a>

On top of this, it seems to be added unneeded CSS classes.

I think these issues are caused the following line: https://github.com/progital/gatsby-wpgraphql-inline-images/blob/dev/src/contentParser.js#L84

What is the need for using theme-ui, will a plain Link component not do the job?

Thanks, Rob

progital commented 4 years ago

Good catch, thanks! The latest update should fix it. Please let me know if it helped.

robmarshall commented 4 years ago

Im getting the error:

_An unexpected error occurred: "could not find a copy of gatsby to link in C:\projects\invoicemaker\gatsby\node_modules\gatsby-wpgraphql-inline-images\nodemodules".

Seems Gatsby Link has not been added to the package.json file.

progital commented 4 years ago

Have you tried removing node_modules and reinstalling everything?

robmarshall commented 4 years ago

Perfect! All good :)