How do I put a blank line in redmine wiki? - redmine

I am just wondering how I can put some blank line in redmine. What I tried is putting the following text:
some sample txt
with a few empty lines
What I got in redmine is
some sample txt
with a few empty lines
So, how can I let redmine to display these empty lines? I tried using whitespace, but they didn't work.

This is a pretty ugly solution, but it gets the job done (on demo.redmine.org which currently runs with redmine version 2.5.0.devel.12954):
some sample txt
with a few empty lines
is displayed as
some sample txt
with a few empty lines

You can also use:
<pre>
blah blah blah
A few lines down
</pre>
Which will look like:
blah blah blah
A few lines down

Related

Convert GFM highlighted code block to Stack Overflow highlighted code block

1. Question
I can't convert GFM highlighted code block to Stack Overflow highlighted code block.
2. Example
For example, I need convert:
Do not change this line
```markdown
Sasha great!
Sasha nice!
She is beautiful, surprise!
```
Do not change this line
to:
Do not change this line
<!-- language: lang-markdown -->
Sasha great!
Sasha nice!
She is beautiful, surprise!
Do not change this line
3. Problem
That get highlighted code block, I need to add tab in beginning of each line inside code block. I don't understand, how I can do it.
4. Not helped
my example regex:
Find:
\`\`\`(.+?)\n((.+?\n)+)\`\`\`
Replace:
<!-- language: lang-\1 -->\n\n\t\2
Demonstration on Regex101.
I get result:
Do not change this line
<!-- language: lang-markdown -->
Sasha great!
Sasha nice!
She is beautiful, surprise!
Do not change this line
Tabulation symbol added in beginning only for first line inside code block. What can I do, that add tab symbol in beginning of each line inside code block?
Since you are using Sublime Text find / replace functionality and there is no programming language involved it would take you about two steps to achieve what you desire.
For first step try to search for:
(?m)(?:^```\h*\S+\s+\K|\G(?!\A))^(?!```)(.*\R+)(?:```)?
and replace with:
\t\1
Live demo
Second find / replace process would be for adding HTML comment so search for:
(?m)^```\h*(\S+)
and replace it with:
<!-- language: lang-\1 -->\n
Live demo

Selecting inner custom tags that have the same parent tag name

I'm using regex to select custom tags, however some of these tags have inner tags of the same name.
My regex is getting mixed up.
\[STORE.*?\]((.*?|\n)*)\[\/STORE\]
Text:
[STORE SMC, DODO]blah blah blah blah blah
[STORE SMC]blah[/STORE]
[STORE DODO]Blah[/STORE].
[/STORE]
...some text here I do not want selected...
[STORE SMC]blah[/STORE]
Select the tags in another run or the same run?
Try this:
\[STORE[^\]]*]((.?|\n)*)\[\/STORE\]
Should work as expected: https://regex101.com/r/rkVKce/1
If you want to also get the inner tags you'll have to apply this regex recursivelly. I believe matching this is too much for pure regex.

Regex to get part of image url (sublime text 3)

I have a XML database containing several thousand positions. Text + html tags (images and links). I need a regex for Sublime Text 3 to replace a portion of the every image url (everything before file name).
For example, I have this:
<img src="/images/fanart/bigfana2121rt/215627676.jpg">
and
<img src="/images/screenshots/goodlooking/tret/215627676.gif">
And I need to get this:
/images/fanart/bigfana2121rt/
and this:
/images/screenshots/goodlooking/tret/
Thank you.
Regex:
<img\b[^>]*\bsrc="([^"]*\/)[^\/"]*"[^<>]*>
Replacement string:
\1
DEMO

Replace text between custome tags

sample of a user entered text paragraph is below. Users can insert a video link under [vinsert]......[/vinsert] tags. I wanted to extract the id number from inner text and replace all text from start to end of the tag so a video will display. Users can insert one or more inserts.
===================================
Dim MyStr2 As String = "Sample text [vinsert]http://www.example.com/video/34760/mytestvideo.aspx[/vinsert] Sample text sample text "
[vinsert]http://www.example.com/video/66779/testing.aspx[/vinsert] -> vidid => 666779 or 34760 is a variable which I need to extract and make a database call to find the video filename.
Dim filename As string
Select filename from myvideotable where id = vidid
I wanted to replace the [vinsert]......[/vinsert] to become the text as below.
<div class="myClass"><iframe width="560" height="315" src="//www.example.com/embed/<%= filename%>" frameborder="0" allowfullscreen></iframe></div>
I tried to use this without success: Regex, everything between 2 html tags vb.net Any help would be appreciated!
You want to use lookahead and look behind. This regex pattern should work
(?<=}\[vinsert\]).*(?=\[/vinsert\])

Regular Expression pattern to match a html tag in LEX utility?

I m new to Lex.
I want to write a lex program to extract all html tags from a file.
I tried several patters to match the tags but all failed to work properly.
I tried
"<"[^>]*> /*The quotes because lex utility gives error that improper start of expression*/
"<"[a-z]+[/]*>
and many more... But when I execute a line like
<h1> This is a heading </h1>
on them, and try to print it with yytext, it simply prints complete line of code as it is instead of just printing
<h1></h1>
Any solutions?
I have got the answer.
What I was doing was, having no action for the rest unmatched text.
I made my rule section of lex program as:
"<"[^>]*> { /* action for tags */ }
.|\n ;
And thats that. Now it prints the desired output.