How to fix 'Link Highlighting in Inline Code'? - asciidoc

The method of writing a code element in Asciidoc is by writing an element enclosed in the grave accent(`):
`var`
And, the method to show a link is:
link:www.awebistelink.com[var]
I am attaching an image to show these two on a website that renders Asciidoc
Image Displaying the output in an asciidoc document
When I am trying to show a link highlight of a code element inside an inline code by writing:
`link:www.awebistelink.com[var]`
It renders perfectly fine on Asciidoc Please see it here
But on the website, it doesn't show any link, and simply shows a code element like as if we declared it simply as
`var`

The correct way to make a link label appear in monospace is to apply the backticks to the label itself, not the link.
Using your example, the markup should be:
link:www.awebsitelink.com[`var`]

I found the answer,
it should be
`link:www.awebistelink.com[var]`
I still don't know how it worked but now it works just fine as intended.

Related

View tiddler with source code in pre block with syntax highlighting

I have a tiddler that contains SQL source code. I am embedding it into another tiddler using the $codeblock macro, and that works wonderfully.
When I view the source tiddler (the first one), I'd like to get it formatted like the embedded one (in a pre block with syntax highlighting applied).
I noticed Tiddlywiki can do this for Stylesheets, when you set a tiddler type to text/css. How can I do the same for other custom types? I've combed the docs but haven't found anything so far, but I freely admit I may be using the wrong terminology in my search. I've also struggled to find the source code that does the pre wrapping for stylesheet tags.
Anyone know how I'd do this?

Prevent asciidoc from converting a file path into a link

I'm manually converting a MS Word document to asciidoc format.
By doing so I ran into an issue that I can't work around yet.
There is an example where I want to show the reader of how the syntax of a file link should look like.
So I used this as an example:
file:///<Path>/<to>/<Keytab>
Asciidoc now renders this pseudo link into an actual link and warns me about this while converting my asciidoc document into HTML and PDF.
Usually, I would simply use the [source] element to prevent the link rendering. But the file link is part of a table.
[options="header,footer",cols="15%,85%"]
|=======================
|parameter|usage
|keyTabLocation |file:///<Path>/<to>/<Keytab>
|=======================
Is there a way to prevent the rendering/convertion of the file link?
Okay, I found the solution. I had to escape the whole macro using a \ at the beginning.
So this did the trick:
[options="header,footer",cols="15%,85%"]
|=======================
|parameter|usage
|keyTabLocation |\file:///<Path>/<to>/<Keytab>
|=======================

How do you apply Markdowndeep to text in view using Razor syntax?

So I followed a tutorial setting up a Markdowndeep editor using MVC and the editor and preview work just fine. The tutorial didn't mention how to render specific text on a page using Markdowndeep though. So I did a few Google searches thinking I'd find an obvious answer but to my surprise I didn't.
Can someone show me an example on how to render a portion of text using Razor?
I figured out the syntax. It was #Html.Markdown(Model.Body)
You must have Markdown Helper installed though.
Another option is to force Razor to return the RAW Html.
If we extend the MarkDownDeep Example, we get the following:
// Instantiate
var md=new MarkdownDeep.Markdown();
// Set options
md.ExtraMode=true;
// Translate
var html=md.Transform(plaintext);
<div>#Html.Raw(html)</div>
and your markdown as HTML should be in the div!

how to disable tag validation in ckeditor?

CKeditor apparently automatically creates matching end tags when you enter a start tag. Is there a way to turn this behavior off?
I have a situation where I am creating two blocks of text in an admin program using CKeditor, then I'm using these to paint a page with the first block, some static content, and then the second block. Now I've got a case where I want to wrap the static content in a table. I was thinking, No problem, I'll just put the <table> tag in the first block and the </table> tag in the second block, and the static content will be inside the table. But no, CKeditor insists on closing the table tag in the first block.
In general, I can go to source mode and enter HTML directly, but CKeditor then decides to reformat my tagging. This seems to rather defeat the purpose of having a source mode. (I hate it when I tell the computer what I want and it tells me, No, you're wrong, I know better than you what you want!)
CKEditor produces valid HTML. Valid HTML has to include both - start and end tags. There's no way to change this behaviour without hacking editor. Note that even if you'll force editor to produce content without one of these tags it will then try to fix this and won't do this as you expect. E.g. load:
<p>foo</p></td></tr></table>
And you'll completely loose this table so only regexp based fix on data loading could help. In the opposite case:
<table><tr><td><p>foo</p>
You'll end up with paragraph wrapped with table, so it's better. But what if someone would remove this table from editor contents?
Therefore you should do this integration outside editor - prepend table to contents of one editor and append to contents of second one. You simply cannot force editor to work on partial HTML.

I am using HTML snippet in to Highlight HTML and Javascript code in blog Joomla. but it's executed after saving it

while creating a article I want to show some HTML code as part of content, but after saving that article that particular snippet of HTML code get executed.
I am using joomla 1.5 | code citation extension for insert code in article. Is there any solution?
You should turn off HTML stripping, or include it as a Custom HTML Module, and writing the position in the article with load position. to load the custom HTML you've put in the Module. i.e.
{loadposition YourModulePosition}
Will load anything you place within a Custom HTML Module.
The correct way should be to paste the code into the wysiwyg (design view, not raw code view) - as long as you have a decent editor the angle brackets should be converted to html entities and it should just work.
The built-in Geshi plugin - though a little dated - is usually all that is needed to make add colored highlighting. The plugin is a little dated but after inserting your code all you need to do to make it work is add:
<pre class="html"> ... </pre>
around your html. Chenge HTML to js, css, etc depending upon the code to be shown.

Resources