Changeset 976
- Timestamp:
- 08/05/11 20:48:55 (10 months ago)
- Location:
- hodgestar/PythonCode/WikiTransformer/wikipub
- Files:
-
- 3 modified
-
compile/latex.py (modified) (4 diffs)
-
interfaces/WikiAst.py (modified) (2 diffs)
-
parse/pmwiki.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hodgestar/PythonCode/WikiTransformer/wikipub/compile/latex.py
r923 r976 60 60 WikiAst.Style.ITALIC: "\\emph{%s}", 61 61 WikiAst.Style.UNDERLINED: "\\underline{%s}", 62 WikiAst.Style.QUOTES: "``%s''", 62 63 } 63 64 … … 263 264 \begingroup 264 265 \Large\bfseries\raggedleft 265 %% \thesection.\ 266 %% \thesection.\ 266 267 #2\par 267 268 \endgroup … … 286 287 \begingroup 287 288 \Large\bfseries\raggedleft 288 %% \thesection.\ 289 %% \thesection.\ 289 290 #2\par 290 291 \endgroup … … 348 349 \vskip 10\p@ 349 350 \begin{flushright} 350 \LARGE 351 \LARGE 351 352 \strut \@title \par 352 353 \vskip 30\p@ -
hodgestar/PythonCode/WikiTransformer/wikipub/interfaces/WikiAst.py
r922 r976 142 142 """Node representing text styled in someway. 143 143 """ 144 BOLD, ITALIC, UNDERLINED = range(3)145 STYLE_TYPES = [BOLD, ITALIC, UNDERLINED ]144 BOLD, ITALIC, UNDERLINED, QUOTES = range(4) 145 STYLE_TYPES = [BOLD, ITALIC, UNDERLINED, QUOTES] 146 146 147 147 def __init__(self,iStyle,oText): … … 188 188 def rows(self): 189 189 """Iterator over the rows in a table. 190 190 191 191 Each item in a row is either a Cell or None. 192 192 None is used to mark cells which have no content because they are covered by ones with rowspan or colspan > 1. -
hodgestar/PythonCode/WikiTransformer/wikipub/parse/pmwiki.py
r922 r976 34 34 35 35 # Character Stlyes 36 LINK, BOLD, ITALICS, VERBATIM, IMAGE = range(5)36 LINK, BOLD, ITALICS, VERBATIM, IMAGE, QUOTES = range(6) 37 37 38 38 def __init__(self): … … 56 56 (self.LINK, re.compile(r"\[\[(?P<link>[^|\]]*)(\|(?P<text>[^|\]]*))?\]\]"), self._handleLink), 57 57 (self.BOLD, re.compile(r"'''(?P<text>.*?)'''"), self._handleBold), 58 (self.QUOTES, re.compile(r'"(?P<text>.*?)"'), self._handleQuotes), 58 59 (self.ITALICS, re.compile(r"(?<!')''(?!')(?P<text>.*?)(?<!')''(?!')"), self._handleItalics), 59 60 (self.VERBATIM, re.compile(r"\[\=|\=\]"), self._handleVerbatim), … … 305 306 return WikiAst.Style(WikiAst.Style.BOLD,self._applyCharStyles(oM.group("text"))) 306 307 308 def _handleQuotes(self,oM): 309 return WikiAst.Style(WikiAst.Style.QUOTES,self._applyCharStyles(oM.group("text"))) 310 307 311 def _handleItalics(self,oM): 308 312 return WikiAst.Style(WikiAst.Style.ITALIC,self._applyCharStyles(oM.group("text")))
