Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
01f9a9ec
Commit
01f9a9ec
authored
Aug 18, 2009
by
Richard Mansfield
Browse files
Add indenting to td, th elements
parent
151d7dd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/htmltotext/htmltotext.php
View file @
01f9a9ec
...
...
@@ -98,8 +98,8 @@ class HtmltoText {
$this
->
newlines
=
2
;
}
private
$indentfirstchar
=
array
(
'bq'
=>
'> '
,
'list'
=>
'- '
,
'dd'
=>
' '
);
private
$indentchar
=
array
(
'bq'
=>
'> '
,
'list'
=>
' '
,
'dd'
=>
' '
);
private
$indentfirstchar
=
array
(
'bq'
=>
'> '
,
'list'
=>
'- '
,
'dd'
=>
'
'
,
'td'
=>
'
'
);
private
$indentchar
=
array
(
'bq'
=>
'> '
,
'list'
=>
' '
,
'dd'
=>
'
'
,
'td'
=>
'
'
);
private
function
output
(
$str
,
$wrap
=
true
)
{
if
(
$this
->
newlines
)
{
...
...
@@ -251,11 +251,15 @@ class HtmltoText {
case
'table'
:
case
'tr'
:
$this
->
para
();
$this
->
process_children
(
$node
);
$this
->
para
();
break
;
case
'td'
:
case
'td'
:
case
'th'
:
$this
->
newline
();
$this
->
indent
[]
=
'td'
;
$this
->
process_children
(
$node
);
$this
->
newline
();
array_pop
(
$this
->
indent
);
break
;
case
'pre'
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment