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

Modifying the PRE and RAW Styles + Provide a Docker build environment #169

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

Conversation

aric49
Copy link

@aric49 aric49 commented Jun 22, 2021

@davidgiven,

Thank you so much for this fantastic tool we can use to write from the comforts of our own terminal. In general, I do a lot of technical writing in my day job and also on my personal blog. I modified the RAW and Preformatted text styles so they are visually distinct from the surrounding plain text. This way, users can tell they have applied the given style to the selected area and improve readability.

Another area that I think would be very helpful is if WordGrinder supported inline preformatted text. For example, in my technical writings I often blurbs like the following:

WordGrinder is a free and opensource word processor for your terminal. To start wordgrinder, simply execute the wordgrinder command followed by any additional arguments..

To get around this, since I simply export most of my documents to markdown, I removed the substitution filter from the markdown export for backticks. This allows me to use to surround the in-line preformatted text with backticks and once exported to markdown, gives me the desired result. However, this is a work around. I tried implementing a preformatted text style similar to the way you did with bold, italic, and underline but I got lost between the C and LUA code. Everything blew up and I just reverted the change. Is this something you'd consider implementing in the future?

Finally, I am contributing a Dockerfile that will allow users to build wordgrinder inside of a Docker container. You can also run wordgrinder containerized and completely isolated from other processes on your system using this approach. I do containers for a living, so I like to containerize everything I can 👍

Let me know if you'd be interested in incorporating these changes. I really appreciate the work you do!

@davidgiven
Copy link
Owner

What I normally do for this (I use WordGrinder to write my longer blog posts in, and I frequently talk about coding) is to sacrifice one of the character styles, typically underline which I hardly ever use, by changing the tags via File->Document Settings->HTML Export. But then, I normally export directly to HTML rather than to Markdown.

Adding another character style wouldn't be easy because there are only four bits available for character styles and they're all in use. I have vague thoughts about allowing more by using some of the high Unicode bits but writing text with lots of character styles isn't really what WordGrinder's for.

I'll admit to not being keen about turning off the export filter for simple backticks, but it could easily be hidden behind a Markdown export settings dialogue --- or underline could be converted to code-text instead (which would avoid markdownisms in the raw text). It wouldn't be difficult to do; look at the bottom half of src/lua/export/html.lua.

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