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

Allow for special markdown tags in the data files. #28

Open
2 tasks
swilgosz opened this issue Dec 13, 2021 · 0 comments
Open
2 tasks

Allow for special markdown tags in the data files. #28

swilgosz opened this issue Dec 13, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@swilgosz
Copy link
Owner

swilgosz commented Dec 13, 2021

Overview

I want to have special tags in the markdown files that should be cleaned out in the rendered HTML.

Todo

  • Wiki links

[[...]] - If there is a pair of doubled square brackets in the content, and it is not inside of the code block, remove the brackets.

Examples

  • my paragraph and [[something inside]] it => <p>my paragraph and something inside it</p>

  • [[Can contain. Even multiple sentences]] => <p>Can contain. Event multiple Sentences</p

  • ## This [[header is also wrapped]] - > <h2>This header is also wrapped</h2>

  • **Block references

^... - Each block of text (paragraph, header, link, code, etc can be marked with the caret character, following the reference identifier. It will be placed at the end of the line always. as long as the reference is at the end of the mdx component content, remove everything after the ^ character.

APPLY only for text outside of code blocks

Examples:

  • # My awesome header^flk2j3j => <h1>My awesome header</h1>
  • > Important quote^kaop2n$2 => `Imprtant quote
  • Paragraph example^2324234 => <p>Paragraph example</p>

Solution

During the MDX component parsing, check each piece of content to contain any of the special tags and get rid of them.

@swilgosz swilgosz added enhancement New feature or request help wanted Extra attention is needed labels Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants