-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use new API for Programming Language Detection
- Loading branch information
1 parent
b895426
commit bb53926
Showing
3 changed files
with
17 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 6 additions & 17 deletions
23
app/contents/form-default/programming-language-detection.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,8 @@ | ||
export const code = | ||
` | ||
<?php | ||
// Get a file into an array. In this example we'll go through HTTP to get | ||
// the HTML source of a URL. | ||
$lines = file('http://www.example.com/'); | ||
export const post_id = 0 | ||
|
||
// Loop through our array, show HTML source as HTML source; and line numbers too. | ||
foreach ($lines as $line_num => $line) { | ||
echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br />\n"; | ||
} | ||
export const content = | ||
"```\n5.times.each do |n|\nputs n\n```" | ||
|
||
// Another example, let's get a web page into a string. See also file_get_contents(). | ||
$html = implode('', file('http://www.example.com/')); | ||
// Using the optional flags parameter since PHP 5 | ||
$trimmed = file('somefile.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); | ||
?> | ||
` | ||
export const tag = [ | ||
null | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters