Simple custom markup
Hi there,
I'm new to the whole markdown/marked thing but already finding it
immensely useful.
I've got a couple of markers that I add to my text that I'd like to
be able to respond to. Is there a simple way to do this that I have
missed or do I need to learn how to do all of the custom processor
work?
I'm kind of hoping there's a simple file somewhere accessible that
says replace the following with this...
Please advise if there is a simple rule set available
somewhere.
Many thanks, in advance,
Matt
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 24 Sep, 2012 09:15 PM
I'm afraid I don't know what you mean by "markers".
2 Posted by megapodematt on 25 Sep, 2012 08:28 AM
Sorry, I should have added an example.
I'm using Scrivener and Marked as a way of documenting a contract I'm working on and so far it achieves 95+% of what I'm trying to do.
However, I have started adding my own little mark ups or markers into the text to make it easy to find things.
One flag I use a lot is /!\ at the start of a paragraph to indicate important. I'd like to find a way, within Marked ideally, to recognise that symbol and others and wrap the whole line in HTML tags such as bold or a class marker or something. That way, in my CSS I can pick it up and show it differently.
So something like how Marked recognises *[space] and makes it a list item.
I hope that makes a little more sense?
Many thanks,
Matt
> From: [email blocked]
> To: [email blocked]
> Date: Mon, 24 Sep 2012 17:15:02 -0400
> Subject: Simple custom markup [Questions]
>
Support Staff 3 Posted by Brett on 25 Sep, 2012 09:28 AM
Marked uses MultiMarkdown as the default processor, so it's standard Markdown with a few extensions. Nothing you or I can easily customize. However, you can run a custom processor to make the substitutions and then pass it to a markdown processor, but I'm afraid it's beyond what I can offer much help with.
4 Posted by megapodematt on 25 Sep, 2012 12:39 PM
Thanks for the very swift response.
I guess I was hoping there was a way to run simple scripts/macros.
I guess I should look into custom processors then. Are there any good starting points you can recommend?
> From: [email blocked]
> To: [email blocked]
> Date: Tue, 25 Sep 2012 05:28:15 -0400
> Subject: Simple custom markup [Questions]
>
Support Staff 5 Posted by Brett on 25 Sep, 2012 01:04 PM
Do you have a scripting language of choice? A processor can be as simple as:
!#/bin/bash
cat | /usr/bin/multimarkdown
It just has to accept input on STDIN (piped) and then echo the output to STDOUT. Any changes you make in between is dependent on what you're using for parsing.
6 Posted by megapodematt on 25 Sep, 2012 01:09 PM
I'm still migrating from Windows and .net so a simple one to learn or good tutorials is probably where I need to start in Mac land :)
Thanks again
> From: [email blocked]
> To: [email blocked]
> Date: Tue, 25 Sep 2012 09:04:17 -0400
> Subject: Simple custom markup [Questions]
>