I'm looking for a way to include code as part of a paragraph in DokuWiki like I can by adding backtick escapes in StackOverflow like _so_. Simply adding <code>bla</code> puts code on it's own line.
You probably want to use ''%%here is code%%''. This formats it in monospace ('') and prevents any interpretion of possible wiki markup (%%).
I was able to find an answer to my own question. Add quotes around the in-text code ''like this''. Simple, short, and works great.
Related
How do I write a regular expression to find ellipses in a text file using VBScript? the text will be look something like this
>…………………………………………………………………………………………………………………<
that I want to find, and replace with something else.
I've tried the following as the search pattern to no avail:
">[\133]*<"
">[…]*<"
">[\133]+<"
">[…]+<"
">[\133]{1,}<"
">[…]{1,}<"
">[\x85]+<"
The first one finds the zero case, but not if an ellipse occurs between the >< characters. Several work when using Notepad++ regular expressions. Any help is appreciated.
I think I've found how to do it.
">[\W]{2,}<"
does it in my file, since the ellipses aren't characters.
In the above context, I can't help but think that a regular expression is a bit overkill, but I had a quick look: \>…+\< will work - it won't capture anything, though, but you could put some parentheses around it if you wanted...
The ellipses is a character. From what I can see, ellipsis is ASCII #133. The character used in your question, however, is something else entirely. They register as ASCII #226 for reasons I can't quite work out. Hopefully someone smarter than me might know the answer. In any event, assuming it is CHR(133), it should be easy enough to construct a string pattern in VBScript to accomplish the above.
Is there an existing method for pull quotes with Pelican? When you're reading an article, and there are balloons with key sentence fragments or excerpts to highlight the area. Ideally, I want to write the text once, and just surround it with whatever delimeter is appropriate and have the template do its magic.
An outdated plugin is available at https://github.com/arocks/markdown-pullquote. With a little tweaking - it works!
I'm trying to represent a short inline span of code with a significant space or two at the end, using Markdown. If I were to put it in a stand-alone code block, it might look like this:
cd
Frustratingly, Markdown transforms `cd ` into <code>cd</code>, deleting the space at the end. How can I do it?
Unfortunately, I'm not aware of a way to do this with backticks in vanilla Markdown. If you need to use your current parser, you can use literal <code> HTML tags to generate correct output:
Normal text. <code>Inline code block with a space: </code> Normal text.
If you're able and interested, switching to a more consistent/expanded parser (such as kramdown, which I've tested, but potentially also MultiMarkdown and others) correctly interprets terminal spaces in code blocks and doesn't truncate them.
I don't believe markdown has anything for that specifically but if you use it will add a non breaking space. In your case replace
`cd `
with
`cd `
and it should work as intended.
Markdown syntax for a link is pretty simple:
[Example](http://example.com/)
produces:
Example
But what if the link itself contains a closing bracket?
[Syntax](http://en.wikipedia.org/wiki/Syntax_(programming_languages))
produces:
Syntax)
which is obviously broken.
Edit
Putting the url in quotes does not work
Sometimes you need to encode ) with %29.
[Syntax](http://en.wikipedia.org/wiki/Syntax_(programming_languages%29)
E.g.: This was the only method I could find to get a correct Markdown preview in the Atom Editor.
You can try to escape the character:
[Syntax](http://en.wikipedia.org/wiki/Syntax_\(programming_languages\))
You can also encode the characters
[Syntax](http://en.wikipedia.org/wiki/Syntax_%28programming_languages%29)
The most reliable way I've found to do this is to use reference-style links instead of inline links.
Here is the wikipedia article on [Syntax][1]
[1]: http://en.wikipedia.org/wiki/Syntax_(programming_languages)
renders correctly as
Here is the wikipedia article on Syntax
I've found that with some sites, percent-escaping the parentheses will break URLs, especially anchors. For example, at least in my version of Firefox, this Android documentation link doesn't take me directly to the method with percent encoding.
But this one with a reference-style link does.
For example, at least in my version of Firefox, this Android documentation link
doesn't take me directly to the method [with percent encoding](https://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface%28java.lang.Object,%20java.lang.String%29).
But this one with a [reference-style link][2] does.
I have found that using < around > the url seems to solve the problem.
In the two internal systems we use that use markdown.
Your mileage may vary with other systems.
[Test](<https://en.wikipedia.org/wiki/Slowloris_(computer_security)>)
Test
Quoting w3Schools:
URLs can only be sent over the Internet using the ASCII character-set.
So, you need to encode any special characters that is not a ASCII character into its respective ASCII character.
In your case, the characters for brackets or parenthesis are
open bracket ( - %28
closing bracket ) - %29
You can use this website to get the encoded url of any website link.
You don't have to scape it at all.
On GitHub, I've just done the following without any problems:
[Slowloris](https://en.wikipedia.org/wiki/Slowloris_(computer_security))
Actually, even here you can use it directly, as you can see here.
LaTeX has %, html has <\!-- to denote that a comment folows.
Does textile have anyway of commenting out text? I couldn't find one, and it seems like it would be a nice feature to have.
Not really. It seems you can do a single line HTML escape sequence containing an HTML comment which is passed through. But you probably want something more like the C Preprocessor comments that are simply stripped out completely?
==<!-- html comment -->==
Or you could do this, which outputs a multiline html comment, but I doubt it's what you want either:
notextile. <!-- test
test
test
-->
The TextPattern version of Textile does support comments.
The syntax is to have a line beginning with three hashes and one or two full stops.
###. This line will be treated as a comment.
So will this.
This line will be displayed.
###.. Blank lines are allowed in comments if you use two full stops.
This line is also a comment.
p. Starting a new block will end the comment.
Currently, the RedCloth and Mylyn implementations of Textile do not support these comments.