Skip to content

Commit

Permalink
Done with pre-processing HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl committed Jul 25, 2023
1 parent cd15969 commit c0e2153
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 196 deletions.
6 changes: 3 additions & 3 deletions odata-protocol/temp/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const clean = old
.replace(/<span[ \n]style='color:#333333'>([^<]*)<\/span>/g,"$1")
.replace(/<span[ \n]style='color:#333333;\n?background:white'>([^<]*)<\/span>/g,"$1")
.replace(/<span[ \n]class=MsoHyperlink>([^<]*)<\/span>/g,"$1")
// .replace(/<span[ \n]style='font-family:Symbol'>· <\/span>/g,"- ")
// TODO: clean up all <span> tags
.replace(/<span lang=EN>([^<]*)<\/span>/g,"$1")
// TODO: clean up more <span> tags

// clean up code formatting
.replace(/<span[ \n]+style='(font-size:[\d\.]+pt;[ \n]*)?font-family:[ \n]*"Courier[ \n]New"(;\n?color:black)?(;\n?background:\n?white)?'>([^<]*)<\/span>/g, "<code>$4</code>")
Expand All @@ -44,7 +44,7 @@ const clean = old
.replace(/<h5>[\d\.\s]*/g, "<h5>##subsubsubsubsec ")
.replace(/<h6>[\d\.\s]*/g, "<h6>##subsubsubsubsubsec ")

// TODO: clean up <div> tags
// TODO: clean up more <div> tags
.replace(/<div style='border:none;border-top:solid gray 1.0pt;padding:6.0pt 0in 0in 0in'>([\s\S]*?)<\/div>/g,"$1")

// clean up references
Expand Down
Loading

0 comments on commit c0e2153

Please sign in to comment.