mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Update some copy-and-paste examples to new standards
This commit is contained in:
parent
1715b8b9f8
commit
b31a0e88c3
3 changed files with 14 additions and 14 deletions
|
@ -128,8 +128,8 @@ require_once('Core.php');
|
|||
<p>Things look much better now, but we’re not perfect yet. If you open a chapter you’ll notice that the <code class="html"><p></code> and <code class="html"><h2></code> tags have a space between the tag and the text. We can clean that up with a few <code class="program">perl</code> commands.</p><code class="terminal"><span>perl -pi -e "s/<(p|h2)>\s+/<\1>/g" src/epub/text/chapter*</span> <span>perl -pi -e "s/\s+<\/(p|h2)>/<\/\1>/g" src/epub/text/chapter*</span></code>
|
||||
<p>Finally, we have to do a quick runthrough of each file by hand to cut out any lingering Gutenberg markup that doesn’t belong. In <i>Jekyll</i>, notice that each chapter ends with some extra empty <code class="html"><div></code>s and <code class="html"><p></code>s. These were used by the original transcriber to put spaces between the chapters, and they’re not necessary anymore, so remove them before continuing.</p>
|
||||
<p>Now our chapter 1 source looks like this:</p>
|
||||
<code class="html full"><?xml version="1.0" encoding="UTF-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: http://standardebooks.org/vocab/1.0" xml:lang="en-US">
|
||||
<code class="html full"><?xml version="1.0" encoding="utf-8"?>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:prefix="z3998: http://www.daisy.org/z3998/2012/vocab/structure/, se: https://standardebooks.org/vocab/1.0" xml:lang="en-US">
|
||||
<head>
|
||||
<title>Chapter 1</title>
|
||||
<link href="../css/core.css" rel="stylesheet" type="text/css"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue