Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing show-whitespace #18

Draft
wants to merge 2 commits into
base: default-a
Choose a base branch
from
Draft

Testing show-whitespace #18

wants to merge 2 commits into from

Conversation

fregante
Copy link
Member

@fregante fregante commented Jun 20, 2022

Spaces

 
  
  function() {}  
function  () {}
 
  
  function() {}  
function  () {}

Tabs

	
		
		function()	{}		
function		()	{}
	
		
		function()	{}		
function		()	{}

Mixed

	 
	 	 
 	 function() {} 	
function	 ()	{}
	 
	 	 
 	 function() {} 	
function	 ()	{}

Inlined

sandbox/README.md

Lines 19 to 28 in d773f59

```md
function() {}
function () {}
# Test URLs
https://github.com/fregante/github-sandbox/issues/345
```

Real code

function showWhiteSpacesOn(line: Element): void {
	const shouldAvoidSurroundingSpaces = Boolean(line.closest('.blob-wrapper-embedded')); // #2285
	const textNodesOnThisLine = getTextNodes(line);
	for (const [nodeIndex, textNode] of textNodesOnThisLine.entries()) {
		// `textContent` reads must be cached #2737
		let text = textNode.textContent!;
		if (text.length > 1000) { // #5092
			continue;
		}

Copy link
Member Author

@fregante fregante left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces

 
  
  function() {}  
function  () {}
 
  
  function() {}  
function  () {}

Tabs

	
		
		function()	{}		
function		()	{}
	
		
		function()	{}		
function		()	{}

Mixed

	 
	 	 
 	 function() {} 	
function	 ()	{}
	 
	 	 
 	 function() {} 	
function	 ()	{}

Inlined

sandbox/README.md

Lines 19 to 28 in d773f59

```md
function() {}
function () {}
# Test URLs
https://github.com/fregante/github-sandbox/issues/345
```

Real code

function showWhiteSpacesOn(line: Element): void {
	const shouldAvoidSurroundingSpaces = Boolean(line.closest('.blob-wrapper-embedded')); // #2285
	const textNodesOnThisLine = getTextNodes(line);
	for (const [nodeIndex, textNode] of textNodesOnThisLine.entries()) {
		// `textContent` reads must be cached #2737
		let text = textNode.textContent!;
		if (text.length > 1000) { // #5092
			continue;
		}

@@ -17,7 +17,7 @@ Rules:
1. I open an issue named `Testing in-title #1 issue references`
Copy link
Member Author

@fregante fregante Jun 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces

 
  
  function() {}  
function  () {}
 
  
  function() {}  
function  () {}

Tabs

	
		
		function()	{}		
function		()	{}
	
		
		function()	{}		
function		()	{}

Mixed

	 
	 	 
 	 function() {} 	
function	 ()	{}
	 
	 	 
 	 function() {} 	
function	 ()	{}

Inlined

sandbox/README.md

Lines 19 to 28 in d773f59

```md
function() {}
function () {}
# Test URLs
https://github.com/fregante/github-sandbox/issues/345
```

Real code

function showWhiteSpacesOn(line: Element): void {
	const shouldAvoidSurroundingSpaces = Boolean(line.closest('.blob-wrapper-embedded')); // #2285
	const textNodesOnThisLine = getTextNodes(line);
	for (const [nodeIndex, textNode] of textNodesOnThisLine.entries()) {
		// `textContent` reads must be cached #2737
		let text = textNode.textContent!;
		if (text.length > 1000) { // #5092
			continue;
		}

README.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant