https://bugs.webkit.org/show_bug.cgi?id=152024
Reviewed by Timothy Hatcher.
* wp-content/plugins/table-of-contents.php:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193807
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
2015-12-08 Jonathan Davis <jond@apple.com>
2015-12-08 Jonathan Davis <jond@apple.com>
+ Fix Code Style Guidelines code parsing.
+ https://bugs.webkit.org/show_bug.cgi?id=152024
+
+ Reviewed by Timothy Hatcher.
+
+ * wp-content/plugins/table-of-contents.php:
+
+2015-12-08 Jonathan Davis <jond@apple.com>
+
Fix social meta for home page.
https://bugs.webkit.org/show_bug.cgi?id=151764
Fix social meta for home page.
https://bugs.webkit.org/show_bug.cgi?id=151764
public static function parse( $content ) {
$markup = preg_replace_callback('{
^<h([1-6])[^>]*>(.+?)<\/h[1-6]>* # HTML tags
public static function parse( $content ) {
$markup = preg_replace_callback('{
^<h([1-6])[^>]*>(.+?)<\/h[1-6]>* # HTML tags
- |
- ^(\#{1,6}) # $1 = string of #\'s
- [ ]*
- (.+?) # $2 = Header text
- [ ]*
- \#* # optional closing #\'s (not counted)
- (?:[ ]+ ' . self::$attr_regex . ' )? # $3 = id/class attributes
- [ ]*
- \n+
}xm',
array('WebKitTableOfContents', 'index'),
$content
}xm',
array('WebKitTableOfContents', 'index'),
$content