-
Notifications
You must be signed in to change notification settings - Fork 63
Add experimental support to build using Bikeshed #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
foolip
wants to merge
21
commits into
main
Choose a base branch
from
bikeshed-experiment
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
99077f5
Add experimental support to build using Bikeshed
foolip 119d1a9
Quickly hack up the conversion in JS
foolip a2b84bc
Work towards working <dfn>s and their use
foolip b03fbd6
Improve cross-linking further (still broken)
foolip c49c398
Unwrap <pre><code> to just <pre>
foolip 9660bdc
Move <a> simplification to a final pass
foolip 2e7888d
Preserve Wattsi IDs
foolip 78a15b2
Don't use data-x to populate lt, just remove them
foolip 19fc283
Remove "new" from the linking text of constructors
foolip b140019
Rewrite data-lt to lt
foolip 017385d
Handle data-lt in more places
foolip 0e8e03e
Handle <i data-x> links
foolip 03bfae7
Make Bikeshed find the right <dfn> more often
foolip 330630b
Use noexport="" to silence some Bikeshed warnings
foolip 94ade7e
Use data-x attribute as local-lt to make more links work
foolip 004e014
Fix up document.write/writeln cases
foolip 15d1327
Handle <dfn data-x=""> better
foolip b4254fc
Lowercase linking texts to detect more clashes
foolip 2dafc45
Use local-lt="xxx-...." to ensure links
foolip d60175e
Remove getTopicAndSource()
foolip a266ce4
Update permalink
foolip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,14 @@ mod rcdom_with_line_numbers; | |
mod represents; | ||
mod tag_omission; | ||
|
||
const BIKEPLATE: &str = "<pre class=metadata> | ||
Group: WHATWG | ||
H1: HTML | ||
Shortname: html | ||
Abstract: HTML is Bikeshed. | ||
Indent: 1 | ||
</pre>"; | ||
|
||
#[tokio::main] | ||
async fn main() -> io::Result<()> { | ||
// This gives slightly prettier error-printing. | ||
|
@@ -35,6 +43,12 @@ async fn run() -> io::Result<()> { | |
// Find the paths we need. | ||
let cache_dir = path_from_env("HTML_CACHE", ".cache"); | ||
let source_dir = path_from_env("HTML_SOURCE", "../html"); | ||
let use_bikeshed_str = env::var_os("USE_BIKESHED"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'd probably be less messy to use a |
||
let use_bikeshed = use_bikeshed_str.is_some_and(|s| s.eq_ignore_ascii_case("TRUE")); | ||
if use_bikeshed { | ||
eprintln!("BIKESHED MODE"); | ||
println!("{}", BIKEPLATE); | ||
} | ||
|
||
// Because parsing can jump around the tree a little, it's most reasonable | ||
// to just parse the whole document before doing any processing. Even for | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.