galaxy-hub icon indicating copy to clipboard operation
galaxy-hub copied to clipboard

Support special Markdown attribute syntax

Open NickSto opened this issue 3 years ago • 2 comments

The .eu hub uses a special remark-attr-like syntax on some of its pages. We don't currently support remark-attr or anything like it.

Note: it's Kramdown's Inline Attribute Lists

Either we need to support it (ideally) or we'd have to manually convert those pages.

NickSto avatar Nov 18 '21 16:11 NickSto

Manual conversion might be a bit of a lift.

A quick grep shows at least 890 instances of it across 91 files:

[Tue Jan 18] me@aziz: ~/galaxy/code/eu-hub
$ git grep -FIl '{:' '*.md' | wc -l
91
[Tue Jan 18] me@aziz: ~/galaxy/code/eu-hub
$ git grep -FI '{:' '*.md' | wc -l
890

NickSto avatar Jan 18 '22 22:01 NickSto

Update: So this syntax actually does seem to work sometimes? I didn't think remark-attr was anything more than barely functional here but I guess it's (conditionally) doing its job?

When does it work?

It seems to only work on some pages, which is probably how I got the impression it doesn't work.

Based on the following tests, it seems it's vue-remark which can't handle it:

Works? Collection parser File
works Insert source-filesystem content/bare/usegalaxy-eu/notices.md
works Insert source-filesystem content/footers/eu.md
works Article source-filesystem content/get-started/index.md
works Article source-filesystem content/events/2021-10-sars-cov-2-training/index.md
broken BareArticle vue-remark content/bare/usegalaxy-eu/metabolomics/index.md
broken VueArticle vue-remark content/events/gcc2022/index.md (manual test)

Whitespace issue

The only hitch is that it seems you need a between the {: and certain special characters like .. Otherwise it won't parse anything until there's a space. That is, in {:.fa .fa-list-ul}, it will ignore the .fa but add the .fa-list-ul. But regular letters seem fine: {:target="_blank"} works. This means a lot of the current .eu content will have to be modified, but minimally

NickSto avatar Apr 23 '22 00:04 NickSto