OpenWaterFoundation / owf-app-dev-ng

Open Water Foundation Angular application to develop common libraries
0 stars 1 forks source link

Showdown - links without hash no longer work #58

Open smalers opened 2 years ago

smalers commented 2 years ago

Now that the InfoMapper has been switched to path location strategy, I want to update markdown files that are used to not use has in the URL. However, this is not working, at least locally in the development environment. An old link looked like:

See also [***Release Notes***](#/content-page/release-notes).

A new link looks like the following (I tried with and without leading slash):

See also [***Release Notes***](/content-page/release-notes).
See also [***Release Notes***](content-page/release-notes).

The first link gives the following (note the duplicate content-page, but one is singular and one is plural):

image

The second link gives the following:

image

The good news is that the old hash location URLs do automatically convert to the new path location URLs. However, I need to know what the proper syntax is to include in Markdown content pages to work. This will also be used with all of the info popups.

It may also make sense in the application to handle converting hash to path and the other way around, depending on what the application uses. I'm not sure we'll ever go back to hash location strategy but don't want to lose track of how that might work. The default can be path location strategy.

Nightsphere commented 2 years ago

There was a small bug in the code now that the hash is not being used, and that has been fixed. So all links will work at the moment, but because of the Showdown property openLinksInNewWindow being set, it considers internal links to other "pages" in the app to be external and will open it in a new tab as well.

I new issue has been created on the Showdown Github page and we are waiting to hear back from them.

smalers commented 2 years ago

Can you update this to link to the Showdown issue so I can monitor?