Hi, since there is no dedicated inline quote syntax with markdown, I styled the <code> element and use backsticks `
I could use insert <code> each time but that’s terrible. I’m fine with my solution except I found out markdown inside the backsticks are not processed. Is it possible to change that behavior with a config parameter ?
Thanks
Why not just type the correct character ‘like this’?
If that is not possible for some reason I think it would be better to just use the correct element <q>like this<q>
and then allow html in your markdown.
Using the wrong element, with the wrong character, seems like the worst of both worlds.
I am not sure if “Quoting” is the main part of the request here, I guess it’s more about “How do I add syntax in Markdown that does not get parsed” maybe.
In that case there is a shortcode called highlight that does exactly what ``` does and can be configured to do other stuff.
Another solution would be to create your own shortcode template.
Last thing to know: If you use 6 backticks and a newline then everything between two of those 6-backticks will be shown as is.
So if you need your code to be transformed somehow (markdownify?) then create your own shortcode and use highlight as a function on it.
If none of these answers fits then feel free to add a code sample of what you want to achieve so we can understand your requirements.
True, but also kinda a smart-ass (respectfully ) answer as there is no dedicated markdown syntax.
I want to avoid shortcodes and inline html elements whenever possible as they are both outside markdown, and not nearly as easy to write as ** ` or _.
I just wish I could order goldmark to simply replace ` by <quote> and like it replaces ** by <strong> and </strong>.
There doesn’t need to be a dedicated Markdown syntax, as you can just type the correct character and Goldmark will leave it as is…
The interest of giving a meaning to snippets of text, is the ability to style them however I want:
the markdown text is:
The question is simple:
how do we concile the appeal for a form of sexual liberation,
technically speaking a `perversion` (as defined by Freud
They may not be terribly exotic but the " « " characters (french quotation marks + U+00A0 no-break space are not easy at all to type or copy/paste every single time I need them !
Having a html element with a neat content
property is sweat.
OK, now I understand your use case I would again suggest html is the best option, it will be semantically correct, is easy to type and will give you the ability to style the element however you want.
An advantage to using <q>
over «
is that it should render correctly for the users locale, and you can attach the cite= attribute to it.
I consider it unlikely that this sort of thing will ever be supported in Markdown.
Fine.
I cook up a regexp and change all those backsticks in one go.
The problem is they go by pair, there is no closing tag to identify.
I’ll have to tell whatever engine I use (string from fish) to replace them progressively: change one match, then read the rest, etc. I’m sure I’ll find out.
Maybe one day there will be a language like markdown but with a wider ranger of semantic signifiers, or one downright easy to extend.
I just can’t see why you would want to.
Typing <q>your quote</q>
is super easy, semantically correct, locale-aware and easy to style. I would certainly not waste my time trying to create a more complicated way to end up with worse html. Occam’s Razor.
Maybe one day there will be a language like markdown but with a wider ranger of semantic signifiers, or one downright easy to extend.
There already is, html.
I headed your advice, regexp-ed the whole content directory and voilà
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.