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

bfix(markdown)!: fix inline html parsing #205

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aman-singh7
Copy link
Member

@aman-singh7 aman-singh7 commented Mar 8, 2022

Fixes #196

Describe the changes you have made in this PR -
Inline HTML Elements between backticks (`) are not parsed. So, I have split the content between ` and if there exist HTML elements in between them then omitted the `.

Screenshot from 2022-03-08 11-18-16

Screenshots of the changes (If any) -
WhatsApp Image 2022-03-08 at 10 54 20 AM

Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.

@coveralls
Copy link

coveralls commented Mar 8, 2022

Pull Request Test Coverage Report for Build 2015709823

  • 3 of 16 (18.75%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 70.563%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/ui/views/ib/syntaxes/ib_backticks_syntax.dart 1 14 7.14%
Totals Coverage Status
Change from base Build 1981608503: -0.2%
Covered Lines: 3912
Relevant Lines: 5544

💛 - Coveralls

@manjotsidhu
Copy link
Member

Good effort @aman-singh7, I will review it soon.

Copy link
Member

@manjotsidhu manjotsidhu left a comment

Choose a reason for hiding this comment

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

This solution looks fine for now. Do check regex for every possible negative cases where it can have fail/in-consistent behavior. Ideally, it's possible to add this functionality in the CircuitVerse/packages markdown engine by parsing the nested content inside blockquote. This will allow us to use any type of md tags inside markdown but it is not in accordance to the GitHub Markdown Spec. The Spec doesn't allow any md tag inside blockquote but jekyll based md does (probably ?).

@aman-singh7
Copy link
Member Author

aman-singh7 commented Mar 11, 2022

@manjotsidhu Ok, I will work on the fork of flutter_markdown in CircuitVerse (i.e CircuitVerse/packages) and try to it include it there. 👍

@manjotsidhu
Copy link
Member

manjotsidhu commented Mar 14, 2022

@manjotsidhu Ok, I will work on the fork of flutter_markdown in CircuitVerse (i.e CircuitVerse/packages) and try to it include it there. 👍

Ok, it's upto you. Other way (can be the best way) can also be to introduce custom builder which will build the blockquote in our way.

@aman-singh7
Copy link
Member Author

@manjotsidhu Ok, I will work on the fork of flutter_markdown in CircuitVerse (i.e CircuitVerse/packages) and try to it include it there. +1

Ok, it's upto you. Other way (can be the best way) can also be to introduce custom builder which will build the blockquote in our way.

Ok cool, I will implement this way 👍

@aman-singh7
Copy link
Member Author

@manjotsidhu The custom builder has been implemented.

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.

[Interactive Book] fix parsing sup HTML tag
3 participants