diff --git a/ground/app.php b/ground/app.php index 5787c6b..31921d9 100644 --- a/ground/app.php +++ b/ground/app.php @@ -33,7 +33,7 @@ class App private static $DB = null; public static $user = null; public static $request = array(); - public static $defaultTitle = 'Лучшие выходные – это выходные в путешествии! – wikipoints.ru'; + public static $defaultTitle = 'Лучшие выходные — это выходные в путешествии! – wikipoints.ru'; /** * Разбивает урл на контроллер, метод и выбирает параметры. diff --git a/ground/classes/Markdown.php b/ground/classes/Markdown.php index 251067e..034db46 100644 --- a/ground/classes/Markdown.php +++ b/ground/classes/Markdown.php @@ -65,7 +65,7 @@ class Markdown static private function replaceChars($string) { $pr = '((^|\s)-{2}($|\s))'; - $rep = '$1–$2'; + $rep = '$1—$2'; $string = preg_replace($pr, $rep, $string); $pr = '((^|\s)\((c|с)\)($|\s))'; @@ -112,8 +112,12 @@ class Markdown $rep = ' '; $string = preg_replace($pr, $rep, $string); + $pr = '((^|\s)-{2}($|\s))'; + $rep = '$1—$2'; + $string = preg_replace($pr, $rep, $string); + // \n & \r - $string = str_replace(array("\n","\r",' -- '), array(' ', ' ',' – '), $string); + $string = str_replace(array("\n","\r"), array(' ', ' '), $string); // URL $pr = '((https{0,1}:\/\/[\da-z\.-]+\.[a-z]{2,6})[\/\w\?=&#%+\.,-]*\/?)'; diff --git a/ground/config_template.php b/ground/config_template.php index dba4557..25a24c7 100644 --- a/ground/config_template.php +++ b/ground/config_template.php @@ -1,7 +1,7 @@ 'Лучшие выходные – это выходные в путешествии! – wikipoints.ru', + 'title' => 'Лучшие выходные — это выходные в путешествии! – wikipoints.ru', 'DB' => array( 'host' => 'localhost', 'user' => 'root', diff --git a/ground/controllers/IndexController.php b/ground/controllers/IndexController.php index 0c28402..d6c2762 100644 --- a/ground/controllers/IndexController.php +++ b/ground/controllers/IndexController.php @@ -83,7 +83,7 @@ class IndexController extends Controller self::addVar('pointLng', $point->lng); } else if (isset($_GET['point']) && $_GET['point'] && strtolower($_GET['point']) == 'random') { $og['title'] = 'Случайная точка на карте wikipoints.ru'; - $og['description'] = 'Случайная точка на карте – это лучший способ узнать что-то новое! – wikipoints.ru'; + $og['description'] = 'Случайная точка на карте — это лучший способ узнать что-то новое! – wikipoints.ru'; $og['site_name'] = App::$defaultTitle; $og['type'] = 'article'; $og['url'] = 'http://wikipoints.ru/?point=random'; diff --git a/public/js/map.js b/public/js/map.js index bfccb70..4a4352c 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -111,7 +111,7 @@ function init(lat, lng) { myMap.on('moveend', function (e) { if (!myMap._popup && $('#boxRoute').css('display') == 'none' && status != statusMovingInHistory) { - document.title = 'Лучшие выходные – это выходные в путешествии! – wikipoints.ru'; + document.title = 'Лучшие выходные — это выходные в путешествии! – wikipoints.ru'; history.pushState({lat: myMap.getCenter().lat, lng: myMap.getCenter().lng, zoom: myMap.getZoom()}, document.title, "/?lat=" + myMap.getCenter().lat + "&lng=" + myMap.getCenter().lng + "&zoom=" + myMap.getZoom()); }