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

Markup Expansion #7

Closed
wants to merge 2 commits into from
Closed

Markup Expansion #7

wants to merge 2 commits into from

Conversation

mek-apelsin
Copy link
Contributor

@mek-apelsin mek-apelsin commented Jun 4, 2019

This build upon the last pull-request #5 and expands upon the markup handling, both by adding a prefix for macros which gofmt doesn't barf on, and by redifining code fences to be more like gfm (and other markdown implementations). Hopeful this is seen as helpful.

@mek-apelsin mek-apelsin changed the title Markup Markup Expansion Jun 4, 2019
@mek-apelsin mek-apelsin force-pushed the markup branch 4 times, most recently from e85b09d to fa82759 Compare June 4, 2019 16:42
Sten Robbin Edgren added 2 commits June 4, 2019 22:09
With this patch you get line directives (common and golang-specific) in
your output. Useful when debugging, by rightclicking on acme or with gF
in vim. Typical output with `go run' or `go build':

  # command-line-arguments
  WhitespacePreservation.md:38: invalid character U+0023 '#'
  WhitespacePreservation.md:38: undefined: TEST
  WhitespacePreservation.md:39: missing return at end of function
  LineNumbers.md:147: undefined: parseHeader

This is could be seen as an improvment, instead of finding a bug in your
go code and then trying to find the right place in your md-files. It is
however very verbose (in your output), it is however "easy" to remove
the directives when you want to publish your go-code:

  sed -i '/^\/\/line/d' main.go
By adding ~ to ` for allowed characters in code fences and ending code
blocks with as many or more characters as we start a codeblock with, we
are probably more conformant with other markdown processors and allows
us to create lmt acceptable markdown which produces markdown.

Moreover macros don't just start with <<< but also //<. This helps by
making it possible to run gofmt on codeblocks in your favourite editor.
@driusan
Copy link
Owner

driusan commented Jun 5, 2019

why did you close this?

@mek-apelsin
Copy link
Contributor Author

It was buggy, didn't really do what i wanted it to do, and I felt I had to take some time to polish my English. I am still working on it on github: https://github.com/mek-apelsin/lmt

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.

2 participants