I'm really confused about this. I have same shortcode but different spacing which causes the second shortcode to fail.
[button link="#"]btn[/button]
[button link="#"]btn[/button]
They look identical but when runing on a compare tool, there's a difference in space before link.
Please see here:
http://www.diff-online.com/view/589710128ca13
How is that possible? Any idea? Thanks.
You can check what character it is at What Unicode Characters it is
You would have realized that the first one is:
U+0020 : SPACE [SP]
While second is:
U+00A0 : NO-BREAK SPACE [NBSP]
Just because they look same doesn't necessary mean they are same character.
Related
So i have these two configurations in my rubocop.yml file
Layout/SpaceAfterColon:
Enabled: true
Style/HashSyntax:
EnforcedShorthandSyntax: always
This shows missing space after colon when i try to use short hand syntax for hash or function call codeclimate shows missing space after colon issue.
If space is given, shows white space before comma issue or trailing white space issue depending on the context.
I would like to use short hand syntax, without seeing missing space after colon issue but have space after colon when not using short hand. white space before comma and trailing white space should also be enabled.
None of the combination of styles works.
apart from above settings
in project .rubocop.yaml
AllCops:
TargetRubyVersion: 3.1
If I create a text, where I got a dash at the start of a word (very common in German language), Google Chrome sets the hyphen at the end of the line and the word at the start of the next line. This is the wrong behavior. It should be the hyphen and the word on one line. Even if I put in a entity between hyphen and word, it still doesn't work correctly.
In Firefox all is well.
Example here: https://jsfiddle.net/p6dp2hLb/2/
You can use ‑ [Unicode Character 'NON-BREAKING HYPHEN' (U+2011)] as an alphabetical character instead of raw dash character because it has its special meanings in formatting.
Maybe you can use a hack to get round it?
<span style="white-space: nowrap;">-a</span>
Let's say I have a web page which contains command line commands for the user to copy paste. Any way to display it with HTML/CSS which makes double clicking on one word select the entire command?
Example: ls -l /myfiles - clicking on "myfiles" here selects only that word, but for the user it'd be a better experience if the entire command was selected for easier copy-pasting. Again: No javascript is the question here.
I commented in the question that selecting multiple words by double clicking is not possible without javascript. This is not totally true at least for firefox. I just found a way that will select multiple words by double clicking the first word!
You need to use a space followed by unicode (right-to-left mark)
Only works in Firefox!
jsfiddle demo
OR double click 'Hello' in the block qoute for demo.
Hello my name is Kasper
I don't know why this is working. I was just experimenting with unicodes... More info can be found on w3.org:
Using a Unicode right-to-left mark (RLM) or left-to-right mark (LRM) to mix text direction inline
EDIT:
Using other unicode space characters may be closer to the behaviour you want. For example unicode DEMO (jsfiddle) OR double click any word in the block quote below (again, only works in firefox)
Hello my name is Kasper
other example (double click on a word with capitals)
in this SENTENCE ONLY WORDS WITH capitals are
selected
Would they be able to just triple click? You can select an entire element with that, or to limit it put in breaks.
This would keep expected highlighting behavior consistent.
No there isn't any way to do that for a double click without javascript.
The default browser behavior is the only behavior available without javascript.
Tripple-click will works to select a single line.
If you want to select a different pattern, you need javascript.
If you only want this behavior on double-click, you need javascript.
Setting the CSS property user-select: all; would allow to select the whole element using a single click: https://www.w3schools.com/cssref/css3_pr_user-select.asp
I have a situation like this http://jsfiddle.net/9cRpe/ .
You can see that the 	 chars (tab character in html) is trimmed/removed when reaching the end of page. Is it something that can be modified by css so the tab is not trimmed?
See the attached image for the result i'd like to achieve. Thanks
white-space: pre-wrap;
MDN Document
Edit: OK, I made a silly answer.
I think the [Tab] character is not designed to act as "insert n spaces here". Instead, consider the following scenario:
--->code
//->code
You can see this in many IDE as long as you don't convert [Tab]s to [Space]s. So I think the [Tab] character means "push the next character to the next tab position".
That's why you don't see a desired space, because "the next character has already been placed in the next tab position".
Compare these two fiddles: http://jsfiddle.net/9cRpe/1/, http://jsfiddle.net/9cRpe/2/,
notice the space I added before the first "===>", and you can see the first "<===" doesn't move ---- it always aligns to the "tab" word on the first line.
I can't think of a solution right now, but I want to cover my previous stupid-ness, so I write these things that hopefully can inspire you...
Try 5 insted of 	
I am url encoding a string of text to pass along to a function. However, it encodes the second space in a double-space as "%A0". This means that when I decode the string, the "%A0" is displayed as a question mark in a black box.
I really just need to be able to remove the extra space, but I'd like to understand what is causing this and how to handle it correctly.
For example:
Something Something else
Encodes to:
Something+%A0Something+else
%A0 indicates a NBSP (U+00A0). + indicates a normal space (U+0020). The NBSP displays as a replacement character (U+FFFD) because the encoding of the character does not match the encoding of the page, so its byte sequence is not valid for the page.
A quick Googling shows that %A0 is the non-breaking space character or in html. A + is the form-encoding for a standard space character.
Source
The problem you're having is that the second "space" is not really a space, it's a character that that font doesn't have a glyph (I think that's the term) to represent (hence the black box with the question mark). %A0 is the escape code for that character. Your code is technically handling it correctly, I think the problem is with whatever is generating the string in the first place.
If I refer to the chart on this page, %A0 is not a space. %20 is the space caracter's encoded value.