Fix duplicate/wrong anchors. Fix Makefile uniq check for anchors, must sort

This commit is contained in:
Thibault Kruse
2016-08-11 00:07:49 +02:00
parent 0785e0b415
commit 70d056f087
2 changed files with 7 additions and 7 deletions

View File

@@ -55,7 +55,7 @@ show-diff: nodejs/node_modules/remark nodejs/remark/.remarkrc $(SOURCEPATH) $(BU
check-references: $(SOURCEPATH) $(BUILD_DIR) Makefile
## check references unique
rm -f $(BUILD_DIR)/$(SOURCEFILE).uniq
grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq
@grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | sort | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq
## check if output has data
if [ -s "build/CppCoreGuidelines.md.uniq" ]; then echo 'Found duplicate anchors:'; cat $(BUILD_DIR)/$(SOURCEFILE).uniq; false; fi