Skip to content

Commit

Permalink
Markup
Browse files Browse the repository at this point in the history
  • Loading branch information
qstudio committed Jul 22, 2020
1 parent 9be7912 commit c3926d2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions library/buffer/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ public static function prepare() {

}

// PROBLEM - some tags change, for example when they have returned a value or had a flag removed, but they open and close the same... so we need to find by that.. but then we are in trouble again in case of not having unique return values for re-used tags???
// check if we have string, so we can warm if not ##
if(
strpos( $string, $value['tag'] ) === false
Expand All @@ -138,6 +136,7 @@ public static function prepare() {

// $string = str_replace( ' ', ' ', $string );
// $string = nl2br( htmlentities( $string, ENT_QUOTES, 'UTF-8' ) );
/*
$return = '';
$lines = explode( "\n", $string );
// h::log( $lines );
Expand All @@ -149,9 +148,10 @@ public static function prepare() {
$return = nl2br( $return );
// h::log( $return );
*/

// kick back ##
return $return;
return $string;

}

Expand Down
2 changes: 1 addition & 1 deletion library/context/_load.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ class_exists( $namespace ) // && exists ##
|| ! is_array( $return_array )
){

h::log( 'e:>Error in returned data from "'.$args['context'].'::'.$args['task'].'"' );
// h::log( 'e:>Error in returned data from "'.$args['context'].'::'.$args['task'].'"' );
// h::log( $return_array );

// ...
Expand Down
2 changes: 1 addition & 1 deletion library/context/ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static function header( $args = null )
// h::log( 'Running from method' );

// we can call the footer::render() method
return theme\view\ui\header::render( $args );
return theme\view\ui\header::header( $args );

}

Expand Down
2 changes: 1 addition & 1 deletion library/parse/_load.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ functions::prepare( $args, $process );
// goes last, as other tags might have added new variables to prepare ##
variables::prepare( $args, $process );

h::log( 't:>THIS breaks many things, but is needed for filters to run and replace correctly.. TODO' );
// h::log( 't:>THIS breaks many things, but is needed for filters to run and replace correctly.. TODO' );
// remove all flags before markup is parsed ##
// flags::cleanup( $args, $process );

Expand Down
2 changes: 1 addition & 1 deletion library/parse/markup.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static function get( string $string = null, $type = 'variable' ) {
// log ##
// h::log( 't:>TOOD - if no self::$args - set to buffer' );
// h::log( self::$args['task'].'~>n:>No variables found in string.' );
h::log( 'd:>No variables found in string.' );
// h::log( 'd:>No variables found in string.' );
// h::log( '$string: "'.$string.'"' );

return false;
Expand Down
4 changes: 2 additions & 2 deletions library/render/markup.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public static function string( $args = null ){
// h::log( 't:>## -- BOOM -- this breaks other flags for buffer search replace ####' );
// $string = preg_replace( $flag_regex, '', $string );

h::log( 'd:>$string: '.$string );
// h::log( 'd:>$string: '.$string );

// filter variable ##
$value = apply_filters( 'q/willow/render/markup/variable', $value, $key );
Expand All @@ -429,7 +429,7 @@ public static function string( $args = null ){
$regex = \apply_filters( 'q/render/markup/string', "~\\$open(?:\s*\[[^][{}]*])?\s*$key\s*\\$close~" );
// $regex = "~\\$open(?:\s*\[[^][{}]*])?\s*$key\s*\\$close~";
//
h::log( $regex );
// h::log( $regex );
// h::log( $flag_regex );
$string = preg_replace( $regex, $value, $string );

Expand Down

0 comments on commit c3926d2

Please sign in to comment.