xrefcheck icon indicating copy to clipboard operation
xrefcheck copied to clipboard

Add support for basic html tags

Open dcastro opened this issue 4 years ago • 9 comments

Clarification and motivation

HTML tags can be used in a markdown file.

For example, in our own readme, we have a <img> tag:

<img src="https://user-images.githubusercontent.com/5394217/70820564-06b06e00-1dea-11ea-9680-27f661ca2a58.png" alt="Output sample" width="600"/>

We should add support for basic HTML tags (embedded in markdown files), such as:

  • images: <img src="link">
  • anchors hyperlinks: <a href="link">Text</a>
  • anchor target locations: <a name="loc"> or <a id="loc">
    • we already support anchor target locations in markdown headers (see example), but now we should support them everywhere

We should investigate which other tags we want to support.

Acceptance criteria

xrefcheck verifies whether anchors and image tags (and possibly others) are valid.

dcastro avatar Oct 31 '21 20:10 dcastro

Oh, that's an interesting point.

Checking images would indeed be helpful, if we succeed to implement #92.

Anchors are handled at the moment, but it would be really nice to see which other HTML tags can make sense in the documentation. E.g. I often use spoilers, but here we probably don't have anything to verify...

Martoon-00 avatar Nov 02 '21 23:11 Martoon-00

Anchors are handled at the moment

I don't think we handle anchor tags at the moment. We do handle <a name="some-name"> in headers, but that's it.

From tests/markdowns/without-annotations/anchors_in_headers.md:

## <a name="stuff-section"></a> Some stuff

[My link](#stuff-section)

dcastro avatar Nov 03 '21 08:11 dcastro

On that point, we should also support for target locations (i.e. <a name="loc">) outside of headers too.

dcastro avatar Nov 03 '21 09:11 dcastro

@Sereja313 now switched to another project, he likely won't be able to work on this task.

@Sereja313 if you have begun working on it and have something to share, or if you suddenly come to implement this issue for some personal preference, I dunno, please mention this here.

Martoon-00 avatar Nov 15 '22 19:11 Martoon-00

@Martoon-00 I'm going to finish the PR for this issue this week.

Sereja313 avatar Nov 16 '22 06:11 Sereja313

Ah, great then :+1:

Martoon-00 avatar Nov 16 '22 16:11 Martoon-00

@Sereja313 How is it going?

If you see that you completely lack time, feel free to just leave a WIP PR where part of the work is done.

Martoon-00 avatar Dec 21 '22 23:12 Martoon-00

Yes, I've been a bit busy, sorry... I'll have some free time tomorrow.

Sereja313 avatar Dec 22 '22 20:12 Sereja313

Great, thanks for posting the PR :+1:

I think we will take it from now on (unless you'd like to follow the PR until it's merged).

Martoon-00 avatar Dec 27 '22 12:12 Martoon-00