https://www.dendron.so/ logo
Join Discord
Powered by
# dev
  • k

    kevins8

    05/26/2021, 10:22 PM
    the issue is that remark2rehype is converting the
    <a>...</a>
    tag into
    <p>...</p>
    i would try rendering it as a rehype node directly when compiling for html. see an example of it here -> https://github.com/landakram/remark-wiki-link
  • k

    kevins8

    05/26/2021, 10:30 PM
    @User 👆
  • h

    hikchoi

    05/26/2021, 10:55 PM
    @User I'm looking at the Lookup controllers and providers as a reference to add those components to the doctor command. There are V2 and V3s of these components. Which one should I base the components for the doctor command? It looks like Lookup controller V2 is still used in the main lookup command but V3 is used in other commands that utilizes lookup.
  • k

    kevins8

    05/26/2021, 11:03 PM
    v3 is the new one that i'm planning on replacing v2 with. use the patterns from v3
  • h

    hikchoi

    05/26/2021, 11:03 PM
    got it 👍
  • s

    SeriousBug

    05/27/2021, 3:52 AM
    Should have figured this out earlier, sorry, but it looks like what I'm attaching to the compiler doesn't even get executed:
    Copy code
    function attachCompiler(proc: Unified.Processor, opts?: PluginOpts) {
      const Compiler = proc.Compiler;
      const visitors = Compiler.prototype.visitors;
      debugger;
    
      if (visitors) {
        visitors.blockAnchor = function (node: BlockAnchor): string | Element {
          debugger;
    I'm hitting the first break point, but never the second one. I tried outputting a hast node directly, but it doesn't really matter because the function doesn't even get called.
  • k

    kevins8

    05/27/2021, 4:27 AM
    oh, i get whats happening. the
    compiler
    only gets called when its compiling the corresponding node type. because we are calling
    remark2rehype
    , the node type gets converted to a
    rehype
    node which is why the compiler never calls it. we use a transformer,
    dendronPub
    (https://github.com/dendronhq/dendron/blob/dev-kevin/packages/engine-server/src/markdown/remark/dendronPub.ts#L157:L157), which runs after parsing but before compilation to transform the remark nodes into rehype nodes.
  • s

    SeriousBug

    05/27/2021, 4:28 AM
    Thanks a lot!
  • k

    kevins8

    05/27/2021, 4:29 AM
    np - i should have caught this in the code review. its been a while since I touched the unified code you'll want to create a case statement in
    dendronPub
    which takes an anchor and converts it into the corresponding html output. you can see tests for it here: https://github.com/dendronhq/dendron/blob/dev-kevin/packages/engine-test-utils/src/__tests__/engine-server/markdown/dendronPub.spec.ts#L101:L101
  • s

    SeriousBug

    05/27/2021, 6:52 AM
    It finally works, thanks again!
  • k

    kevins8

    05/27/2021, 8:43 PM
    @User @User heads up that I updated the dendron-site docs about our markdown parsing architecture: https://wiki.dendron.so/notes/dc72e684-8ff8-4c41-a2f7-93fc14ee0d6a.html very minimal right now so please add on as you guys are working on it 🙏
  • h

    hikchoi

    05/27/2021, 8:44 PM
    did you just push? it's 404ing
  • k

    kevins8

    05/27/2021, 9:20 PM
    yep. takes ~1min to udpate
  • k

    kevins8

    05/27/2021, 9:20 PM
    live now
  • k

    kevins8

    05/27/2021, 9:20 PM
    @User pr looks good, just left a few minor comments https://github.com/dendronhq/dendron/pull/766#pullrequestreview-670645665
  • h

    hikchoi

    05/27/2021, 9:24 PM
    hmm... still 404 for me
  • s

    SeriousBug

    05/27/2021, 9:24 PM
    I can see it fine
  • h

    hikchoi

    05/27/2021, 9:25 PM
    🤔
  • u

    user

    05/27/2021, 9:30 PM
    me too
  • u

    user

    05/27/2021, 9:30 PM
    can see it fine, I mean
  • h

    hikchoi

    05/27/2021, 9:33 PM
    probably some github CDN cache issue. I think
  • k

    kevins8

    05/27/2021, 9:48 PM
    can you clear the cache on your browser or try a different one?
  • h

    hikchoi

    05/27/2021, 9:48 PM
    did try that. 404s on all of them. tried on mobile as well. still nada.
  • h

    hikchoi

    05/27/2021, 9:49 PM
    well. I think the CDN dropped the cache now
  • h

    hikchoi

    05/27/2021, 9:49 PM
    I can see it now
  • k

    kevins8

    05/27/2021, 9:53 PM
    i think github is also slow to refresh its cache internationally. planning on moving this to dendron managed hosting soon - we do near instant cache invalidation globally 🚀
  • h

    hikchoi

    05/27/2021, 9:59 PM
    yeah. it's raining here in Korea so I'm suspecting things are gonna be slow here 😄 (outrageous made-up claim that my jetlagged brain came up with btw)
  • c

    codefriar

    05/28/2021, 2:17 PM
    Out of curiosity, should we see a visual different when we enable the new tree view?
  • h

    hikchoi

    05/28/2021, 2:46 PM
    If you enable it, you will see a second view alongside the original one
  • c

    codefriar

    05/28/2021, 2:48 PM
    well that's interesting then.
1...676869...108Latest