coleslaw-org / coleslaw

Flexible Lisp Blogware
BSD 2-Clause "Simplified" License
560 stars 82 forks source link

RST formatter generates HTML document with it's own html/head tags #113

Closed svetlyak40wt closed 8 years ago

svetlyak40wt commented 8 years ago

For example, here what I have in my page:

<!DOCTYPE html>
<html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>12 Forks</title> <meta name\
="viewport" content="width=device-width, initial-scale=1.0"> <link href="/css/bootstrap.min.css" rel="stylesheet" media="scree\
n"> <link href="/css/custom.css" rel="stylesheet" media="screen"> <link rel="alternate" href="/rss.xml" type="application/rss+\
xml" />  </head> <body> <div class="container-fluid"> <div class="row-fluid"> <div class="offset2 span8"> <div class="row-flui\d"> <div class="navbar navbar-inverse"> <div class="navbar-inner"> <a class="brand" href="/">12 Forks</a> <ul class="nav"> <li\> <a href="/1.html">Blog</a> </li><li> <a href="/about.html">About</a> </li><li> <a href="https://github.com/12forks/command-l\ine/releases">Download</a> </li> </ul> </div> </div> </div> <div class="row-fluid"> <!-- POST --> <div class="row-fluid">      <h1 class="page-header"></h1>                                                                                                  <p>  </p> <p class="date-posted"> <!-- POST-BEFORE-DATE-POSTED -->  <!-- POST-AFTER-DATE-POSTED --> </p> <!-- BEFORE_POST_TEXT\
 --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>                                                                                                                         <link rel="stylesheet" href="default.css" type="text/css" />
<title>Rationale</title>
</head>
<body>
<div id="rationale" class="document"><h1 class="title">Rationale</h1>
<p>GitHub is great, but sometimes it is difficult to estimate if there are some valuable code in project's forks. Especially f\
or popular project like xxx.</p>
<p>This script builds a report with all non merged forks and their commit messages. This allows to read or grep through and fi\
nd if there are something useful.</p>

Pay attention to the second DOCTYPE html PUBLIC occurrence.

svetlyak40wt commented 8 years ago

@PuercoPop I've fixed this bug today. Will send a pull-request soon.

svetlyak40wt commented 8 years ago

Here is a pull: https://github.com/kingcons/coleslaw/pull/115

PuercoPop commented 8 years ago

I've been looking into this issue and saw that rst plugin imports the symbol write-part from docutils and docutils.writer.html (which signals simple-program error on CCL).