mwoffliner icon indicating copy to clipboard operation
mwoffliner copied to clipboard

URL rewritting is not economical (and probably not robust/fast)

Open kelson42 opened this issue 5 years ago • 9 comments

While relative liniks are perfectly correct, they are not quite as economical as they could be. Relative links on the landing of WVEN page look of like this:

<a title="Europe" href="../../A/Europe">Europe</a>

It would be sufficient for them to be coded like this:

<a title="Europe" href="../Europe">Europe</a>

In other words, the relative links take us two levels up and then back down into the current namespace, which isn't necessary.

I thinks this means that we have custom relative path computation. I wonder why we don't use https://millermedeiros.github.io/mdoc/examples/node_api/doc/path.html#path.relative. This would offer many advantages:

  • Avoid the many bugs we have already detected - and still have open - around this feature
  • Avoid many unit tests around that
  • A solution for sure a lot faster than what we have (and this routine is used a lot)

kelson42 avatar Jul 21 '19 06:07 kelson42

Not 1.9/2.0

ISNIT0 avatar Jul 22 '19 09:07 ISNIT0

@ISNIT0 The current code still fails in some cases see #726, even after opening and reopening many time tickets. So why not using the most simple/efficient solution to fix properly things? Why it has not been used until now?

kelson42 avatar Jul 22 '19 09:07 kelson42

The current "re-opening" seems to be nothing to do with slash re-writing, and more to do with special namespaces being handled weirdly.

ISNIT0 avatar Jul 22 '19 10:07 ISNIT0

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar Nov 01 '19 16:11 stale[bot]

@midi To me we should have a function like this: getUrlForZimHtml(contentId, [mime-type], [current]).

kelson42 avatar May 09 '20 12:05 kelson42

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar Jul 11 '20 00:07 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar Feb 14 '21 19:02 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar Jun 16 '21 22:06 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar May 26 '23 17:05 stale[bot]