-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into pagination-urls
- Loading branch information
Showing
37 changed files
with
2,583 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Deploy localdev (PR) | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
deploy-localdev: | ||
uses: LibriVox/librivox-ansible/.github/workflows/localdev.yaml@master | ||
with: | ||
catalog_git_refspec: ${{ github.ref }} | ||
catalog_git_version: FETCH_HEAD | ||
playbooks_repo: LibriVox/librivox-ansible | ||
playbooks_repo_ref: master |
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
/** | ||
* For a while, newlines weren't being rendered properly in the catalog HTML, | ||
* so people put manual <br /> tags into project descriptions. Now, we want to | ||
* render the newlines properly, so we need to try and dedupe a bit so that we | ||
* don't have crazy amounts of whitespace. | ||
* | ||
* Inspired by this post: https://www.darklaunch.com/php-normalize-newlines-line-endings-crlf-cr-lf-unix-windows-mac.html | ||
* | ||
* $description string The description to render as HTML | ||
*/ | ||
function _normalize_and_deduplicate_newlines_in_html($description) { | ||
// Normalise everything to '\n' characters | ||
$description = preg_replace( | ||
array("/<br ?\/?>\r?\n?/i", "/\r\n?/"), | ||
"\n", | ||
$description | ||
); | ||
|
||
// Replace suspiciously-long strings of newlines | ||
$description = preg_replace( | ||
"/\n{3,}/", | ||
"\n\n", | ||
$description, | ||
); | ||
|
||
// Turn the newlines into '<br />' tags | ||
// return nl2br($description); | ||
return str_replace( | ||
"\n", | ||
"<br />", | ||
$description, | ||
); | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
_ci_phpunit_test/tmp/ | ||
.phpunit.cache | ||
.phpunit.result.cache | ||
build |
Oops, something went wrong.