Skip to content

Fix LINK block#3

Open
blombard wants to merge 4 commits intorieg-ec:mainfrom
Leexi-ai:main
Open

Fix LINK block#3
blombard wants to merge 4 commits intorieg-ec:mainfrom
Leexi-ai:main

Conversation

@blombard
Copy link
Copy Markdown

Context

I have this error: uninitialized constant MdToNotion::Lexer::LINK (NameError)

Fix

I removed tokenize_link and handle it directly in tokenize_rich_text

Comment on lines +110 to +124
def italic(match)
{ type: :italic, text: match.gsub(/\*/, "") }
end

def strikethrough(match)
{ type: :strikethrough, text: match.gsub(/~~/, "") }
end

def link(match)
{ type: :link, text: match.gsub(LINK, '\1'), link: match.gsub(LINK, '\2') }
end

def text(match)
{ type: :text, text: match }
end
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rearrange to follow the same order as in the case block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants