This blog post includes my contributions done during Google Summer of Code 2021, week 8 & 9, starting from July 26 - August 8. As we are approaching the last milestones of this project, we started to see positive outcomes from this project. The book is now getting more and more better in terms of readability and it’s usage.
In this week, we planned to add support for -
- HTML inline tags (sup, sup, etc.)
- Mathjax formulas
- Bug fixes and Improvements
- Enforce Conventional Commits
HTML Inline tags
Since markdown doesn’t provide
<sub> tags for superscript and subscript, implementing the support for these inline tags became important. We extended the functionality of flutter_markdown to add support for HTML inline syntax parsing and developing custom builders for these tags like Supscript builder and Superscript builder.
Have a look at the implementation: fix(ib): Inline HTML tags and support for sub, sup tags
Interactive Book uses
jekyll-scholar to implement Mathjax formulas. They are basically a way to write math formulas using syntaxes like LaTeX and KaTeX. We use a similar package which implements atleast the basic implementation of Mathjax called
flutter_math_fork. It is an experimental package but that is the only one actively maintained and which doesn’t uses Webview to render these formulas.
Bug fixes and Improvements
We have been working on many features but now we again look back and make some improvements to them and make the implementations more stable.
- Mathjax: Since custom and auto tagging is not supported, we remove those keywords to allow rendering the basic formula without the required feature.
- Subscript and Superscript Builder: Add support for non-selectable text.
- Embed Syntax: Enhance RegEx for iframe capturing which now supports multi-line iframe tag.
- Liquid Syntax: Enhance RegEx to support single quotes (‘) as well.
Enforce Conventional Commits specification
Conventional Commits specification provides human and machine readable meaning to commit messages. We started practicing them in last few weeks and now we decided to move ahead with this specification and enforce the specification in mobile-app repository. We implemented git hooks that actually automatically checks our new commit just before saving it. This saves a lot of time and fixing these silly mistakes are taken care at the time of commiting.
These features makes the Interactive Book almost complete. We should now be working towards making it much more stable and implementing features from the community.