How to put single quote and double quote in post filename - yaml

Is it possible to use special characters like single and double quote in yml front matter

Post file name are used to represent the link to the post, so having a file my-post.md will result in /my-post link. Putting quotes there is a bad idea - quotes in the link will be html encoded - so link won't look nice, and it will make your life harder dealing with files with quotes.
I assume you're missing the yml front matter feature - you can name your file with a simple name, but have a title in your post with any character you want:
---
title: W'ha"t e!veR T?<tle## y04 w4nt
---

If I use double quote I need to use > in title like
title: >
A winter's "day"

Related

Escape double quotes in qsTrId source string

For a project I'm working on, I'm forced to use qsTrid() that need the following syntax to work:
//% "My string"
text: qsTrId('my_string')
Until you need to use double quotes there are no drawbacks in using this for simple strings, still you cannot use arguments normally like you would do for qsTr().
The problem arise when you need something like this:
//% "My "super" string"
text: qsTrId('my_super_string')
lupdate will only see "My " as source string, since the double quotes are used as delimiter.
Up to now the best I could achieve is this:
//% "My ""super"" string"
That will produce "My super string", the string is not broken but is missing the double quotes.
I've tried searching online and in the documentation if there are special rules in this case, but had no luck.
I tried using single quotes but lupdate does not see the string at all in this case.
I cannot use \" because the source string is used in the other language that will not be translated, but if it is the only solution I'll try to propose it.
Anyone know how to correctly escape the double quotes in this situation?

Changing escape character for quotes

I am trying to read a CSV file which contains escaped quote values such as:
"1","unquoted text","\"quoted text\""
It seems that SuperCSV wants quotes to be quoted as
"1","unquoted text","""quoted text"""
Is there a way to change the escape character to a backslash? I've looked at the docs and not seen anything.
Just found a link to an issue logged in github: https://github.com/super-csv/super-csv/issues/14
Seems like a different CSV handler is in order.

Interpolation within single quotes

How can I perform interpolation within single quotes?
I tried something like this but there are two problems.
string = 'text contains "#{search.query}"'
It doesn't work
I need the final string to have the dynamic content wrapped in double quotes like so:
'text contains "candy"'
Probably seems strange but the gem that I'm working with requires this.
You can use %{text contains "#{search.query}"} if you don't want to escape the double quotes "text contains \"#{search.query}\"".
'Hi, %{professor}, You have been invited for %{booking_type}. You may accept, reject or keep discussing more about this offer' % {professor: 'Mr. Ashaan', booking_type: 'Dinner'}
Use
%q(text contains "#{search.query}")
which means start the string with single quote. Or if you want to start with double quote use:
%Q(text contains '#{text}')

Custom code highlight Notepad++

I am creating a custom code highlight for notepad++. What I want to do is the following:
some fieldnames are writen in the code with a ' in front of their name, for exampe
if 'variable = "test" then ...
I would like to highlight these words, but notepad++ does not seem to allow a delimiter starting with ' and ending with a space, not does it allow space as an escape character. Also, using ' as a keyword and enabling prefix mode has no effect. Anyone has a suggestion? Should I use another expression to let notepad recognise the space/' ?
Thanks in advance!
If you only need to highlight a single word, you can use a keyword in prefix mode. However when using single or double quotes in a keyword, they need to be escaped with a backslash. So your keyword would be:
\'
This may not be possible in notepad++. I can get the behavior you want using a character other than a single quote, like a back-tic, but it doesn't seem to work with single or double quotes. I suspect those characters are treated special within the syntax highlighter.

Write # in yaml (in the string)

I'm new using yml files (for translations in my framework).
I'm trying to add a "#" inside the translation (will be a twitter share... blabla).
Is this possible, because the file translate it like a comment...
Just put the value inside single or double quotes and it won't be treated like a comment. Something like:
en:
twitter:
share: "#hashtag"

Resources