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

Update codeblock regex - fix multiple codeblocks #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

apmiller108
Copy link

This PR adds support for converting notes with multiple code blocks. Previously, only the last code block was being converted and thus repeated (see screenshots below). Also this updates the code block regex to make it a bit more reliable:

  • Remove local code_block variable and rely on matched pattern to
    convert multiple code blocks.
  • Sometimes exported enex files do not contain the -en-codeblock tag. This
    uses the border style attribute to match the code block.

Before

before

After

after

- Remove local `code_block` variable and rely on matched pattern to
convert multiple code blocks.
- Sometimes exported enex files do not contain the `-en-codeblock` tag.  This
uses the border style attribute to match the code block.
@IssueHuntBot
Copy link

@rohjs has started working. Visit this issue on Issuehunt

@IssueHuntBot
Copy link

@rohjs has stopped working. Visit this issue on Issuehunt

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