Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding/extending support for several unhandled block types (GitBook Page refs,Hint,Anchor,Emoji node,inline-image,etc) #7

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

I-Dont-Remember
Copy link

@I-Dont-Remember I-Dont-Remember commented Jun 20, 2023

Dove in to just fix page links, ended up finding and touching up a variety of other things I ran into.

Changes

  • Now able to pull Spaces from a user's personal, not just an organization space
  • GitBook page links were undefined, now are connected to the actual page metadata and look like [Submit](/docs/requests/submit "Submit a Request")
  • Hint blocks were undefined, now are rendered as block quote with emoji (see README for example).
  • inline images in some cases were undefined
  • anchor links were showing as undefined
  • Emoji node - should fix UnhandledPromiseRejection "Unknown inline type: emoji" #5
  • Added unit tests for the new functionality
  • Script for downloading all images of a Space

QA

  • Unit tests pass
  • Files formatted with Prettier
  • type checks pass
  • No undefined showing when run on actual Spaces

Areas for potential improvement

I was moving fast and didn't have the time to hit every area I might have liked to.

  • I believe the files lookup dict could be combined with the spaceContent data that I added to the markdown renderer
  • Would be nice to be able to pass a prefix to GitBook links rendering, in case you want to keep the same structure at the new destination for your markdown but it sits under a different path.

@I-Dont-Remember I-Dont-Remember changed the title Adding/extending support for several unhandled block types (GitBook Page refs,Hint,Anchor,inline-image,etc) Adding/extending support for several unhandled block types (GitBook Page refs,Hint,Anchor,Emoji node,inline-image,etc) Jun 20, 2023
@I-Dont-Remember I-Dont-Remember force-pushed the feature/personal-spaces-inline-emojis branch from 1b6e85a to e81b89a Compare June 28, 2023 15:42
@josepmc josepmc mentioned this pull request Sep 11, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

UnhandledPromiseRejection "Unknown inline type: emoji"
1 participant