Commit graph

16 commits

Author SHA1 Message Date
48d0da81e0 use html generator for some things, fix x(x) styling 2022-08-23 12:07:35 +01:00
5054e0ba1e include class on spans 2022-08-18 03:36:35 +01:00
03901025b0 fix animation name 2022-08-18 03:22:01 +01:00
5e8723e54b don't append styles 2022-08-18 02:40:10 +01:00
Ilja
1bf36d1f52 Code review part 3
* <https://ilja.space/notice/ALpd6nux5hT2nsfetM>
    * Previous commit: `|> fill_props(token) after the cond` in the parser
    * Previous commit: Don't use intention-specific data in the tokens (e.g. left is reverse, x is mfm-spinX)
* <https://ilja.space/notice/ALpcK6W59UjkIUofU8>
    * This commit: Use less files
* Previous commit: Change nested if-statement in mfm.ex to `cond do`

I also added some more and better info to the README.md and moduledocs.
2022-07-25 14:13:43 +02:00
Ilja
a8dd3dd719 Code review part 2
* <https://ilja.space/notice/ALpd6nux5hT2nsfetM>
    * Previous commit: `|> fill_props(token) after the cond` in the parser
    * This commit: Don't use intention-specific data in the tokens (e.g. left is reverse, x is mfm-spinX)
* <https://ilja.space/notice/ALpcK6W59UjkIUofU8>
    * TODO: Use less files
* Previous commit: Change nested if-statement in mfm.ex to `cond do`
2022-07-25 09:29:24 +02:00
Ilja
ecd3f750cb Code review
* <https://ilja.space/notice/ALpd6nux5hT2nsfetM>
    * This commit: `|> fill_props(token) after the cond` in the parser
    * TODO: Don't use intention-specific data in the tokens (e.g. left is reverse, x is mfm-spinX)
* <https://ilja.space/notice/ALpcK6W59UjkIUofU8>
    * TODO: Use less files
* This commit: Change nested if-statement in mfm.ex to `cond do`
2022-07-25 09:18:22 +02:00
Ilja
0a2894f07a Fix bug when starting with $-sign
When a text token was running, it wouldn't stop on a $-sign if it wasn't followed with a "[".
This is good.

But when a token was finished and the next char was a $-sign, it would consider it an MFMOpen, even when not followed by a "[".
This is now fixed.
2022-07-25 01:21:02 +02:00
Ilja
ed970aa77d Move Encoder logic to own module 2022-07-25 00:44:45 +02:00
Ilja
d9ffd99e4d Convert a tree to HTML + formatting + docs 2022-07-24 16:32:57 +02:00
Ilja
5f63b7e4bd Make it not crash when tag not properly ended
The following cases are now tested and fixed so they don't crash:
* Providing a "]" without there being a mfm token opened.
* Opening a tag without closing. E.g. "$[spin " and "$[spin chocolatine".
* Starting a tag without finishing it. E.g. "$[sp".
2022-07-24 10:28:29 +02:00
Ilja
5bb5620778 Make parser work for multiple token input
We can now handle multiple tokens and nesting.
2022-07-24 09:04:01 +02:00
Ilja
45519a3c2a Make parser work for single token input
We can handle all needed tokens.
We still need to test for multiple tokens and for nesting.
2022-07-24 07:55:55 +02:00
Ilja
733388fa6e Change Lexer to use a data structure for tokens 2022-07-23 20:17:34 +02:00
Ilja
4748d833b2 Make Reader and Lexer work 2022-07-23 19:15:08 +02:00
Ilja
cf49876a47 First commit
Initialise repository
2022-07-23 16:51:13 +02:00