aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-20~!refactored compile_line codedx
Similar to previous commit, make it more general and easier to adapt through generalizing state and algorithms.
2020-05-20~!refactored compile_inner_text codedx
Make it a bit cleaner, uses a switch to setup general variables (tag strings, lengths, etc) then a general algorithm that is guaranteed to work for any single character markdown syntax if those variables are set.
2020-05-20+strikethrough tag to accepted tokensdx
2020-05-20+docs for each functiondx
2020-05-09+better explanation for reamdedx
2020-05-07~formattingdx
2020-05-07+token checker functiondx
This will check if a given character is a valid plain text token (*, _). This will allow me to abstract away and assess if some plain text needs to be further processed
2020-05-07+find_string algorithmdx
This algorithm looks for substrings in a big string, attempting to find the index of the first occurence.
2020-05-07+!fix buffer overflow; causes removal of end tagdx
2020-05-07+!fix for REPL bug with missing end tagsdx
When using fgets(), the returned string doesn't have a null terminator but rather a newline (you use a RET to end input). So I made a little script portion dedicate to finding the first newline and wholly removing it.
2020-05-07~correcting my intuition about c-stringsdx
On converting, I would sometimes get the other tag missing. This was both on the repl and the tests, and was quite annoying. Each c-string should end in a null terminator, which I forgot about. So this commit fixes that by setting the last character pointer on each branch to the null terminator.
2020-05-07~rearrange the formatted string callsdx
2020-05-07~puting branching comments on the line they referencedx
2020-05-06+list handler for parserdx
This checks if the first item is a hyphen, then generates a <li> tag surrounding the content
2020-05-06+!fixed bug, caused close tag to not occur in headerdx
This was because it wrote to the null character and thus was inaccessible (I think).
2020-05-06~free memory in repldx
2020-05-06~compile_plain_text -> compile_inner_textdx
2020-05-06+repl to maindx
2020-05-06+condition to make main parse one command at willdx
2020-05-06~propagating diagnostic refactordx
2020-05-06+whitespace considerationsdx
2020-05-06+routine to compile plain text +diagnosticsdx
This routine will handle asterisks and bullet points. Works by checking characters at each step. Also has diagnostics by checking for matching characters. If a matching asterisk, for example, isn't found then present an error and quit.
2020-05-06~test_header_depths -> test_compile_line_header_depthsdx
2020-05-06+simple testing argument to executable in maindx
If argc is greater than 1 and the second argument is --test then run tests.
2020-05-06+test for header depthsdx
2020-05-06+testing systemdx
Very elementary, doesn't use some massive framework, should just use asserts and C-lang constructs. Currently one method is present in the header, test_header_depths.
2020-05-06+introduced compiler.h and compiler.cdx
compiler.h holds definitions necessary for compiling markdown, compiler.c the implementations. Moved implementation of compile_line to compiler.h and compiler.c respectively.
2020-05-06~clang format shenanigansdx
To make clang format happy, I put continue on the for loop so that it will have at least one statement.
2020-05-06~untag -> close_tagdx
Makes more sense as a variable name.
2020-05-06~express header algorithm in terms of new constantsdx
untag_size, tag_size, etc. These represent the proper sizes and are easier to mutate.
2020-05-06+header depth algorithmdx
This adds the functionality for arbitrary levels of header depth which will be translated to depth based header tags. \## -> <h2> \### -> <h3> etc This also introduces a variable 'size_of_content' which presents the size of the raw string without the header tags as added size.
2020-05-06~changed title for first ifdx
2020-05-06+compile_line function, can turn '#' -> <h1>dx
compile_line is the main function which compiles a single line in C. Similar to the stage of compilation in the python program. Currently supports header tags
2020-05-06+typedef to make char* into stringdx
Looks nice in my editor and is nice to use when writing code. Will be removed via some simple grepping later if I'm asked lol.
2020-05-06+support for bullet pointed listsdx
2020-05-06+C project via https://github.com/odavep/CTemplatedx
I'll try implementing my current system with it's current features into C
2020-05-06~md -> orgdx
2020-05-06+support for paragraphingdx
By checking at every line break whether paragraphing has been started, I can generate paragraphs quickly
2020-05-06+confirmation of markdown compilationdx
2020-05-06+apply template to content and write to output filedx
This firstly formats the template with certain conditional variables (title and body) and then generates a html file based on the option chosen. The time one was a bit annoying as it required using ctime.
2020-05-06+rule parser for markdown translationdx
Using re.sub, translate certain lines of markdown into html equivalents. Currently supports: '#', '**' and '*'.
2020-05-06+initial html file formatdx
Uses % symbols to delimit variables to substitute. Title and body are two fundamental files.
2020-05-05+read the initial html filedx
This html file has a specific format
2020-05-05squash! +option parsing capabilitydx
2020-05-05+argument validation for markdown file testdx
Usign regex to check if each file is a markdown file or not, skipping any that are
2020-05-05+option parsing capabilitydx
This allows for command line arguments. Currently have -i and -o: -i for initial template html -o for the output type (date or filename)
2020-05-05+simple gitignoredx
2020-05-05+converter.py filedx
This will be the main file for conversions to occur, though the project may grow out of this file.
2020-05-05Initial commitodavep