Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • C CCS Backend
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • monero-project
  • CCS Backend
  • Merge requests
  • !17

allow for spaces after "---"

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open plowsoff requested to merge plowsofff/ccs-back:plowsofff-master-patch-23135 into master Oct 31, 2022
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1
<?php
$contents = preg_split('/\r?\n?---(|\s+)\r?\n/m', "---  \nhello:1\nworld:2\nok:1\nok:2\n---\nsaac");

if (sizeof($contents) < 3) {
    throw new \Exception("Failed to parse proposal, can't find YAML description surrounded by '---' lines");
} else {
	echo "\nIts ok";
}
?>

https://onlinephp.io/

(|\s+) = nothing OR space(s) "--- " "---" "--- " = ok

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: plowsofff-master-patch-23135