emanote icon indicating copy to clipboard operation
emanote copied to clipboard

Remove footnotes from `og:description`

Open TristanCacqueray opened this issue 1 year ago • 8 comments
trafficstars

This change remove any footnotes from the og:description header.

TristanCacqueray avatar Mar 15 '24 15:03 TristanCacqueray

I'm sure there is a better way to filter the pandoc ast, but that fixes my issue.

TristanCacqueray avatar Mar 15 '24 15:03 TristanCacqueray

Sure, thanks, that's much better!

TristanCacqueray avatar Mar 15 '24 22:03 TristanCacqueray

@TristanCacqueray Have you tested it to work? Because it is not working for me:

image

srid avatar Mar 18 '24 23:03 srid

I remember testing the change to heist-extra, but looking at the code it does not seem to make sense (the catchall is already removing unmatched inlines). First of all, the function comes from commonmark-wikilink, and using query does not seem to be enough as it descends the Note node even when it is replaced with mempty. So I think we still need to somehow filter that node from the tree.

TristanCacqueray avatar Mar 25 '24 15:03 TristanCacqueray

@srid sorry about that, now using commonmark-wikilink.url = "github:TristanCacqueray/commonmark-wikilink/plainify-without-notes"; seems to work for the adding-images description.

TristanCacqueray avatar Mar 25 '24 15:03 TristanCacqueray

Something's still off, because the "Paste Image" part repeats at the end.

image

srid avatar Mar 25 '24 19:03 srid

@TristanCacqueray It would be good to merge this, after that issue above (https://github.com/srid/emanote/pull/529#issuecomment-2018733384) is resolved.

srid avatar Jul 02 '24 01:07 srid

@srid I agree, unfortunately I don't have much time to work on this at the moment.

TristanCacqueray avatar Jul 02 '24 11:07 TristanCacqueray